From 69420ae2c587c75cfb915330d4f60f866281345b Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 28 Sep 2017 15:33:50 -0400 Subject: Use standard exit codes. Use EXIT_ defines for readibility. There were some exit codes > 1, but they don't seem to be checked by any of the parent process code. This does mean that the logs might have changed, but modern logging techniques have probably made this obsolete. https://bugzilla.gnome.org/show_bug.cgi?id=788307 --- utils/gdm-screenshot.c | 6 +++--- utils/gdmflexiserver.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/gdm-screenshot.c b/utils/gdm-screenshot.c index c8919828..7d1e2cf7 100644 --- a/utils/gdm-screenshot.c +++ b/utils/gdm-screenshot.c @@ -239,7 +239,7 @@ prepare_screenshot (void) char *filename; if (!screenshot_grab_lock ()) { - exit (0); + exit (EXIT_SUCCESS); } win = GDK_ROOT_WINDOW (); @@ -250,7 +250,7 @@ prepare_screenshot (void) if (screenshot == NULL) { /* FIXME: dialog? */ - exit (1); + exit (EXIT_FAILURE); } play_sound_effect (win); @@ -287,7 +287,7 @@ main (int argc, char *argv[]) if (! res) { g_warning ("%s", error->message); g_error_free (error); - exit (1); + exit (EXIT_FAILURE); } prepare_screenshot (); diff --git a/utils/gdmflexiserver.c b/utils/gdmflexiserver.c index 02ffdb3a..68b8ac95 100644 --- a/utils/gdmflexiserver.c +++ b/utils/gdmflexiserver.c @@ -143,7 +143,7 @@ main (int argc, char *argv[]) if (show_version) { g_print ("%s %s\n", argv [0], VERSION); - exit (1); + exit (EXIT_FAILURE); } /* don't support commands other than VERSION */ -- cgit v1.2.1