From ffdf3ab3e374aa1bc7acfb6e5dd35bee71af5a13 Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Mon, 13 Aug 2012 15:33:32 -0400 Subject: deduplicate some error handling --- pulsemix.c | 11 ++++------- 1 file 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) -- cgit v1.2.3