]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - fade.c
Don't check return value of command line parsers unnecessarily.
[paraslash.git] / fade.c
diff --git a/fade.c b/fade.c
index 2954fa32689887e9b8703f0eb34c29e710e6c072..d2ab8287e88973e38066ff97e80ff738a17e144b 100644 (file)
--- a/fade.c
+++ b/fade.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1998-2012 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 1998-2013 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -52,7 +52,7 @@ static int fade(struct mixer *m, struct mixer_handle *h, int new_vol, int fade_t
        unsigned long long tmp, tmp2; /* Careful with that axe, Eugene! */
 
        if (fade_time <= 0)
-               return 1;
+               return m->set(h, new_vol);
        secs = fade_time;
        PARA_NOTICE_LOG("fading to %d in %d seconds\n", new_vol, secs);
        ret = m->get(h);
@@ -89,7 +89,7 @@ static void client_cmd(const char *cmd)
        pid_t pid;
        char *cmdline = make_message(BINDIR "/para_client %s", cmd);
 
-       PARA_INFO_LOG("%s\n", cmdline);
+       PARA_NOTICE_LOG("%s\n", cmdline);
        ret = para_exec_cmdline_pid(&pid, cmdline, fds);
        free(cmdline);
        if (ret < 0) {
@@ -292,8 +292,7 @@ int main(int argc, char *argv[])
        struct mixer *m;
        struct mixer_handle *h = NULL;
 
-       if (fade_cmdline_parser(argc, argv, &conf))
-               exit(EXIT_FAILURE);
+       fade_cmdline_parser(argc, argv, &conf);
        HANDLE_VERSION_FLAG("fade", conf);
        ret = configfile_exists();
        if (!ret && conf.config_file_given) {