]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/DiskIO/DiskDaemon/diskd.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / DiskIO / DiskDaemon / diskd.cc
index 35bd416f8093c4671868bc445ee189926a3261ac..e0588bba1fb0b1735277f5dbaccb904a6f0d7a56 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -321,7 +321,7 @@ main(int argc, char *argv[])
 
     if (rmsgid < 0) {
         perror("msgget");
-        return 1;
+        exit(EXIT_FAILURE);
     }
 
     key = atoi(argv[2]);
@@ -329,7 +329,7 @@ main(int argc, char *argv[])
 
     if (smsgid < 0) {
         perror("msgget");
-        return 1;
+        exit(EXIT_FAILURE);
     }
 
     key = atoi(argv[3]);
@@ -337,21 +337,21 @@ main(int argc, char *argv[])
 
     if (shmid < 0) {
         perror("shmget");
-        return 1;
+        exit(EXIT_FAILURE);
     }
 
     shmbuf = (char *)shmat(shmid, NULL, 0);
 
     if (shmbuf == (void *) -1) {
         perror("shmat");
-        return 1;
+        exit(EXIT_FAILURE);
     }
 
     hash = hash_create(fsCmp, 1 << 4, fsHash);
     assert(hash);
     if (fcntl(0, F_SETFL, SQUID_NONBLOCK) < 0) {
         perror(xstrerr(errno));
-        return 1;
+        exit(EXIT_FAILURE);
     }
     memset(&sa, '\0', sizeof(sa));
     sa.sa_handler = alarm_handler;
@@ -413,6 +413,6 @@ main(int argc, char *argv[])
     if (shmctl(shmid, IPC_RMID, 0) < 0)
         perror("shmctl IPC_RMID");
 
-    return 0;
+    return EXIT_SUCCESS;
 }