GCC Code Coverage Report
Directory: cvmfs/ Exec Total Coverage
File: cvmfs/authz/authz.cc Lines: 8 9 88.9 %
Date: 2019-02-03 02:48:13 Branches: 1 2 50.0 %

Line Branch Exec Source
1
/**
2
 * This file is part of the CernVM File System.
3
 */
4
5
#include "authz.h"
6
7
#include <cstring>
8
9
#include "smalloc.h"
10
11
8
AuthzToken *AuthzToken::DeepCopy() {
12
8
  AuthzToken *result = new AuthzToken();
13
8
  result->type = this->type;
14
8
  result->size = this->size;
15
8
  if (this->size > 0) {
16
8
    result->data = smalloc(result->size);
17
8
    memcpy(result->data, this->data, this->size);
18
  } else {
19
    result->data = NULL;
20
  }
21
8
  return result;
22
}