]> git.alsa-project.org Git - alsa-utils.git/commitdiff
aconnect: fix error handler for alsa-lib <= 1.2.15
authorJaroslav Kysela <perex@perex.cz>
Mon, 1 Jun 2026 08:23:03 +0000 (10:23 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 1 Jun 2026 08:23:03 +0000 (10:23 +0200)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
seq/aconnect/aconnect.c

index d782ef073c155438107dbabcdb27e6a0cf0d7261..173590aca764fcf7d6394a4351a5d6394ee19b52 100644 (file)
@@ -3,11 +3,11 @@
  *   ver.0.1.3
  *
  * Copyright (C) 1999 Takashi Iwai
- * 
+ *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation.
- * 
+ *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -42,8 +42,8 @@ static void error_handler(const char *file, int line, const char *function, int
        va_start(arg, fmt);
        fprintf(stderr, "ALSA lib %s:%i:(%s) ", file, line, function);
        vfprintf(stderr, fmt, arg);
-       if (err)
-               fprintf(stderr, ": %s", snd_strerror(err));
+       if (errcode)
+               fprintf(stderr, ": %s", snd_strerror(errcode));
        putc('\n', stderr);
        va_end(arg);
 }
@@ -367,7 +367,7 @@ int main(int argc, char **argv)
                fprintf(stderr, _("can't open sequencer\n"));
                return 1;
        }
-       
+
 #if SND_LIB_VER(1, 2, 15) < SND_LIB_VERSION
        snd_lib_error_set_handler(error_handler);
 #else