summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_snapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/modules/vfs_snapper.c')
-rw-r--r--source3/modules/vfs_snapper.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index fac4aa698de..39b8ccb097a 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -1216,7 +1216,6 @@ static NTSTATUS snapper_snap_path_to_id(TALLOC_CTX *mem_ctx,
{
char *path_dup;
char *str_idx;
- char *str_end;
uint32_t snap_id;
int error = 0;
@@ -1251,8 +1250,8 @@ static NTSTATUS snapper_snap_path_to_id(TALLOC_CTX *mem_ctx,
}
str_idx++;
- snap_id = strtoul_err(str_idx, &str_end, 10, &error);
- if (error != 0 || str_idx == str_end) {
+ snap_id = strtoul_err(str_idx, NULL, 10, &error);
+ if (error != 0) {
talloc_free(path_dup);
return NT_STATUS_INVALID_PARAMETER;
}