]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/log/file/log_file_daemon.cc
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / log / file / log_file_daemon.cc
index a2c9c8b1f610329cb7c5650bcf18d69cd5515130..d8102b15e4874102e01bf90366b8776f60df482c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -101,12 +101,12 @@ main(int argc, char *argv[])
 
     if (argc < 2) {
         printf("Error: usage: %s <logfile>\n", argv[0]);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     fp = fopen(argv[1], "a");
     if (fp == NULL) {
         perror("fopen");
-        exit(1);
+        exit(EXIT_FAILURE);
     }
     setbuf(stdout, NULL);
     /* XXX stderr should not be closed, but in order to support squid must be
@@ -137,12 +137,12 @@ main(int argc, char *argv[])
                         fp = fopen(argv[1], "a");
                         if (fp == NULL) {
                             perror("fopen");
-                            exit(1);
+                            exit(EXIT_FAILURE);
                         }
                         fprintf(fp, "%s", buf + 1);
                     } else {
                         perror("fprintf");
-                        exit(1);
+                        exit(EXIT_FAILURE);
                     }
                 }
             }
@@ -155,7 +155,7 @@ main(int argc, char *argv[])
             fp = fopen(argv[1], "a");
             if (fp == NULL) {
                 perror("fopen");
-                exit(1);
+                exit(EXIT_FAILURE);
             }
             break;
         case 'T':
@@ -181,6 +181,6 @@ main(int argc, char *argv[])
     }
     fclose(fp);
     fp = NULL;
-    exit(0);
+    return EXIT_SUCCESS;
 }