Directory: | cvmfs/ |
---|---|
File: | cvmfs/authz/authz.cc |
Date: | 2025-04-20 02:34:28 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 8 | 9 | 88.9% |
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 "util/smalloc.h" | ||
10 | |||
11 | 2 | AuthzToken *AuthzToken::DeepCopy() { | |
12 | 2 | AuthzToken *result = new AuthzToken(); | |
13 | 2 | result->type = this->type; | |
14 | 2 | result->size = this->size; | |
15 |
1/2✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
|
2 | if (this->size > 0) { |
16 | 2 | result->data = smalloc(result->size); | |
17 | 2 | memcpy(result->data, this->data, this->size); | |
18 | } else { | ||
19 | ✗ | result->data = NULL; | |
20 | } | ||
21 | 2 | return result; | |
22 | } | ||
23 |