aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2012-08-13 15:33:32 -0400
committerSimon Gomizelj <simongmzlj@gmail.com>2012-08-13 15:33:32 -0400
commitffdf3ab3e374aa1bc7acfb6e5dd35bee71af5a13 (patch)
tree32d4c23b2f75724d7ae16fa53283baba42b2d3c1
parent38b8be02986486b0ca696b07a2fc5a888af2af28 (diff)
downloadmirror-ponymix-ffdf3ab3e374aa1bc7acfb6e5dd35bee71af5a13.tar.gz
mirror-ponymix-ffdf3ab3e374aa1bc7acfb6e5dd35bee71af5a13.tar.bz2
mirror-ponymix-ffdf3ab3e374aa1bc7acfb6e5dd35bee71af5a13.zip
deduplicate some error handling
-rw-r--r--pulsemix.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/pulsemix.c b/pulsemix.c
index ae1e8d0..b220ff0 100644
--- a/pulsemix.c
+++ b/pulsemix.c
@@ -838,15 +838,12 @@ int main(int argc, char *argv[])
}
if (pulse.head == NULL) {
- if (mode && !id) {
+ if (mode && !id)
warnx("%s id not set, no default operations", pp_name);
- rc = 1;
- goto done;
- } else {
+ else
warnx("%s not found: %s", pp_name, id ? id : "default");
- rc = 1;
- goto done;
- }
+ rc = 1;
+ goto done;
}
if (arg && fn_get_by_name)