aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/util.c
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2019-01-20 19:07:43 +0100
committerLibravatar smitsohu <smitsohu@gmail.com>2019-01-20 19:07:43 +0100
commita26a25db063bcf174dc5c01688b7fd04228a77d8 (patch)
tree354193c96efac1aae82d96fb0f8f86d0e6376f07 /src/firejail/util.c
parentdisallow zero seconds timeout (diff)
downloadfirejail-a26a25db063bcf174dc5c01688b7fd04228a77d8.tar.gz
firejail-a26a25db063bcf174dc5c01688b7fd04228a77d8.tar.zst
firejail-a26a25db063bcf174dc5c01688b7fd04228a77d8.zip
cleanup, minor improvements
Diffstat (limited to 'src/firejail/util.c')
-rw-r--r--src/firejail/util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/firejail/util.c b/src/firejail/util.c
index f1c4f7059..b1fba4226 100644
--- a/src/firejail/util.c
+++ b/src/firejail/util.c
@@ -454,7 +454,6 @@ void trim_trailing_slash_or_dot(char *path) {
454 assert(path); 454 assert(path);
455 455
456 char *end = strchr(path, '\0'); 456 char *end = strchr(path, '\0');
457 assert(end);
458 if ((end - path) > 1) { 457 if ((end - path) > 1) {
459 end--; 458 end--;
460 while (*end == '/' || 459 while (*end == '/' ||
@@ -941,9 +940,7 @@ int remove_overlay_directory(void) {
941 // wait for the child to finish 940 // wait for the child to finish
942 waitpid(child, NULL, 0); 941 waitpid(child, NULL, 0);
943 // check if ~/.firejail was deleted 942 // check if ~/.firejail was deleted
944 if (stat(path, &s) == -1) 943 if (stat(path, &s) == 0)
945 return 0;
946 else
947 return 1; 944 return 1;
948 } 945 }
949 return 0; 946 return 0;