diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-09-07 06:02:53 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-09-07 06:02:53 -0400 |
commit | 2240d9ca9f1b367ef985eef8a3a028936ac71f56 (patch) | |
tree | 3c9543b96e5eb24b35836942db7c508fc239a8da /gpxlogger.c | |
parent | c6e26279e448cb50d26aa308a1473a1d192b192a (diff) | |
download | gpsd-2240d9ca9f1b367ef985eef8a3a028936ac71f56.tar.gz |
Replace exit({0,1}) with exit(EXIT_{SUCCESS,FAILURE})
Note there are some exit(2) instances we bneed to decide what to do with.
Diffstat (limited to 'gpxlogger.c')
-rw-r--r-- | gpxlogger.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gpxlogger.c b/gpxlogger.c index eff63ef5..e9140ded 100644 --- a/gpxlogger.c +++ b/gpxlogger.c @@ -174,7 +174,7 @@ static void quit_handler(int signum) syslog(LOG_INFO, "exiting, signal %d received", signum); print_gpx_footer(); (void)gps_close(&gpsdata); - exit(0); + exit(EXIT_SUCCESS); } /************************************************************************** @@ -192,7 +192,7 @@ static void usage(void) "defaults to '%s -i 5 -e %s localhost:2947'\n", progname, progname, export_default()->name); /*@-nullderef@*/ - exit(1); + exit(EXIT_FAILURE); } /*@-mustfreefresh -mustfreeonly -branchstate -globstate@*/ @@ -207,7 +207,7 @@ int main(int argc, char **argv) if (export_default() == NULL) { (void)fprintf(stderr, "%s: no export methods.\n", progname); - exit(1); + exit(EXIT_FAILURE); } logfile = stdout; @@ -229,7 +229,7 @@ int main(int argc, char **argv) (void)fprintf(stderr, "%s: %s is not a known export method.\n", progname, optarg); - exit(1); + exit(EXIT_FAILURE); } break; case 'f': /* Output file name. */ @@ -274,13 +274,13 @@ int main(int argc, char **argv) break; case 'l': export_list(stderr); - exit(0); + exit(EXIT_SUCCESS); case 'm': minmove = (double )atoi(optarg); break; case 'V': (void)fprintf(stderr, "%s revision " REVISION "\n", progname); - exit(0); + exit(EXIT_SUCCESS); default: usage(); /* NOTREACHED */ @@ -289,7 +289,7 @@ int main(int argc, char **argv) if (daemonize && logfile == stdout) { syslog(LOG_ERR, "Daemon mode with no valid logfile name - exiting."); - exit(1); + exit(EXIT_FAILURE); } if (method != NULL) @@ -327,7 +327,7 @@ int main(int argc, char **argv) (void)fprintf(stderr, "%s: no gpsd running or network error: %d, %s\n", progname, errno, gps_errstr(errno)); - exit(1); + exit(EXIT_FAILURE); } if (source.device != NULL) @@ -339,6 +339,6 @@ int main(int argc, char **argv) print_gpx_footer(); (void)gps_close(&gpsdata); - exit(0); + exit(EXIT_SUCCESS); } /*@+mustfreefresh +mustfreeonly +branchstate +globstate@*/ |