summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-30 03:38:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:49 -0500
commit5b3d90e48b8f599cb0f4458839c26d33a9cbd7b3 (patch)
treecf66759149716708abab998d620866246105691d /examples
parent56a5d05b8b285250bdc0e9cc3c8f3c3d8af80382 (diff)
downloadsamba-5b3d90e48b8f599cb0f4458839c26d33a9cbd7b3.tar.gz
samba-5b3d90e48b8f599cb0f4458839c26d33a9cbd7b3.tar.bz2
samba-5b3d90e48b8f599cb0f4458839c26d33a9cbd7b3.zip
r22591: Fix up the examples also.
Jeremy. (This used to be commit aa5a1591c626e2828244a78f237af8a59af57784)
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/shadow_copy_test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/VFS/shadow_copy_test.c b/examples/VFS/shadow_copy_test.c
index 155181229b..98ac304ee2 100644
--- a/examples/VFS/shadow_copy_test.c
+++ b/examples/VFS/shadow_copy_test.c
@@ -58,7 +58,11 @@ static int test_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fs
shadow_copy_data->num_volumes = num;
if (labels) {
- shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num);
+ if (num) {
+ shadow_copy_data->labels = TALLOC_ZERO_ARRAY(shadow_copy_data->mem_ctx,SHADOW_COPY_LABEL,num);
+ } else {
+ shadow_copy_data->labels = NULL;
+ }
for (i=0;i<num;i++) {
snprintf(shadow_copy_data->labels[i], sizeof(SHADOW_COPY_LABEL), "@GMT-2003.08.05-12.%02u.00",i);
}