use EXIT_SUCCESS and EXIT_FAILURE instead of 0 and 1 when calling exit
authorNikolas Garofil <garo@dunaldi.garofil.be>
Sun, 26 Jul 2009 23:29:57 +0000 (01:29 +0200)
committerNikolas Garofil <garo@dunaldi.garofil.be>
Sun, 26 Jul 2009 23:29:57 +0000 (01:29 +0200)
src/conky.c
src/mail.c

index 36c00c0..bf656a3 100644 (file)
@@ -263,7 +263,7 @@ static void print_version(void)
 #endif /* HAVE_LUA */
        );
 
-       exit(0);
+       exit(EXIT_SUCCESS);
 }
 
 static const char *suffixes[] = { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "" };
@@ -641,7 +641,7 @@ static void human_readable(long long num, char *buf, int size)
 static struct text_object global_root_object;
 
 //our own implementation of popen, the difference : the value of 'childpid' will be filled with
-//the pid of the running 'command'. This is useful if want to kill it it hangs while reading
+//the pid of the running 'command'. This is useful if want to kill it when it hangs while reading
 //or writing to it. We have to kill it because pclose will wait until the process dies by itself
 FILE* pid_popen(const char *command, const char *mode, pid_t *child) {
        int ends[2];
index 5b1f253..d6fef22 100644 (file)
@@ -458,12 +458,12 @@ void *imap_thread(void *arg)
 #ifdef HAVE_GETHOSTBYNAME_R
        if (gethostbyname_r(mail->host, &he, hostbuff, sizeof(hostbuff), &he_res, &he_errno)) { // get the host info
                ERR("IMAP gethostbyname_r: %s", hstrerror(h_errno));
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 #else /* HAVE_GETHOSTBYNAME_R */
        if ((he_res = gethostbyname(mail->host)) == NULL) {     // get the host info
                herror("gethostbyname");
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 #endif /* HAVE_GETHOSTBYNAME_R */
        while (fail < mail->retries) {
@@ -767,12 +767,12 @@ void *pop3_thread(void *arg)
 #ifdef HAVE_GETHOSTBYNAME_R
        if (gethostbyname_r(mail->host, &he, hostbuff, sizeof(hostbuff), &he_res, &he_errno)) { // get the host info
                ERR("POP3 gethostbyname_r: %s", hstrerror(h_errno));
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 #else /* HAVE_GETHOSTBYNAME_R */
        if ((he_res = gethostbyname(mail->host)) == NULL) {     // get the host info
                herror("gethostbyname");
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 #endif /* HAVE_GETHOSTBYNAME_R */
        while (fail < mail->retries) {