diff options
Diffstat (limited to 'src/firejail/util.c')
-rw-r--r-- | src/firejail/util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c index 95409129a..29eb101fb 100644 --- a/src/firejail/util.c +++ b/src/firejail/util.c | |||
@@ -391,7 +391,8 @@ void extract_command_name(const char *str) { | |||
391 | 391 | ||
392 | 392 | ||
393 | void update_map(char *mapping, char *map_file) { | 393 | void update_map(char *mapping, char *map_file) { |
394 | int fd, j; | 394 | int fd; |
395 | size_t j; | ||
395 | size_t map_len; /* Length of 'mapping' */ | 396 | size_t map_len; /* Length of 'mapping' */ |
396 | 397 | ||
397 | /* Replace commas in mapping string with newlines */ | 398 | /* Replace commas in mapping string with newlines */ |
@@ -407,7 +408,7 @@ void update_map(char *mapping, char *map_file) { | |||
407 | exit(EXIT_FAILURE); | 408 | exit(EXIT_FAILURE); |
408 | } | 409 | } |
409 | 410 | ||
410 | if (write(fd, mapping, map_len) != map_len) { | 411 | if (write(fd, mapping, map_len) != (ssize_t)map_len) { |
411 | fprintf(stderr, "Error: cannot write to %s: %s\n", map_file, strerror(errno)); | 412 | fprintf(stderr, "Error: cannot write to %s: %s\n", map_file, strerror(errno)); |
412 | exit(EXIT_FAILURE); | 413 | exit(EXIT_FAILURE); |
413 | } | 414 | } |