aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-13 22:33:48 -0400
committerDave Reisner <dreisner@archlinux.org>2012-08-13 22:33:48 -0400
commit523b81bdb97e4a4fbf65ab46e358effd09d81d5e (patch)
tree56e527fafa6049e7eaf79a61763f732337e6392d
parent62556214991fcbc5291f104c89eadac32151439a (diff)
downloadmirror-ponymix-523b81bdb97e4a4fbf65ab46e358effd09d81d5e.tar.gz
mirror-ponymix-523b81bdb97e4a4fbf65ab46e358effd09d81d5e.tar.bz2
mirror-ponymix-523b81bdb97e4a4fbf65ab46e358effd09d81d5e.zip
consistently return EXIT_{SUCCESS,FAILURE} in main
-rw-r--r--pulsemix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pulsemix.c b/pulsemix.c
index 7f1af75..c053db7 100644
--- a/pulsemix.c
+++ b/pulsemix.c
@@ -724,7 +724,7 @@ int main(int argc, char *argv[])
char *id = NULL, *arg = NULL;
long value = 0;
enum mode mode = MODE_DEVICE;
- int rc = 0;
+ int rc = EXIT_SUCCESS;
const char *pp_name = "sink";
int (*fn_get_default)(struct pulseaudio_t *) = get_default_sink;
@@ -766,7 +766,7 @@ int main(int argc, char *argv[])
pp_name = "source";
break;
default:
- exit(1);
+ return EXIT_FAILURE;
}
}
@@ -811,7 +811,7 @@ int main(int argc, char *argv[])
/* initialize connection */
if (pulse_init(&pulse) != 0)
- return 1;
+ return EXIT_FAILURE;
switch (verb) {
case ACTION_DEFAULTS:
@@ -841,7 +841,7 @@ int main(int argc, char *argv[])
warnx("%s id not set, no default operations", pp_name);
else
warnx("%s not found: %s", pp_name, id ? id : "default");
- rc = 1;
+ rc = EXIT_FAILURE;
goto done;
}