linux-atm: Fix compile warning
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 22 Feb 2020 19:39:47 +0000 (20:39 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 24 Feb 2020 22:25:28 +0000 (23:25 +0100)
The function trace_on_exit() is given to atexit() as a parameter, but
atexit() only takes a function pointer to a function with a void
parameter.

This problem was introduced when the on_exit() function was incompletely
replaced by atexit().

Fixes: ba6c8bd6142f ("linux-atm: add portability fixes")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/network/utils/linux-atm/patches/400-portability_fixes.patch

index 9fe3e1faea7f088644b73e6d54b440d4af27c9b7..41425eed19d7a7dc4c264326a51ecbc76b673bcf 100644 (file)
  #include <linux/atmioc.h>
 --- a/src/sigd/atmsigd.c
 +++ b/src/sigd/atmsigd.c
-@@ -517,7 +517,7 @@ int main(int argc,char **argv)
+@@ -283,12 +283,11 @@ static void setup_signals(void)
+ /* ------------------------------- main ...  ------------------------------- */
+-static void trace_on_exit(int status,void *dummy)
++static void trace_on_exit(void)
+ {
+     char path[PATH_MAX+1];
+     FILE *file;
+-    if (!status) return;
+     if (!dump_dir) file = stderr;
+     else {
+       sprintf(path,"atmsigd.%d.trace.exit",getpid());
+@@ -517,7 +516,7 @@ int main(int argc,char **argv)
            exit(0);
        }
      }