Skip to content

Commit 5bc15ee

Browse files
committed
fix: Filename Handling, ret value fixed
1 parent 0bec91b commit 5bc15ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libltfs/arch/filename_handling.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,9 @@ char * _generate_target_file_name(const char *prefix, const char *extension, int
246246
if (!target) {
247247
ltfsmsg(LTFS_ERR, 10001E, "_generate_target_file_name: target assign");
248248
ret = -1;
249+
} else {
250+
ret = strlen(target);
249251
}
250-
ret = target ? strlen(target) : -1;
251252
}
252253
}
253254

0 commit comments

Comments
 (0)