From 2275bb0aaaf40bcf617fbf4bfd47ea5ae2d00fe6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=D0=9A=D0=BE=D1=80=D0=B5=D0=BD=D0=B1=D0=B5=D1=80=D0=B3=20?= =?utf8?q?=D0=9C=D0=B0=D1=80=D0=BA=20=28=D0=BD=D0=BE=D1=83=D1=82=D0=B1?= =?utf8?q?=D1=83=D0=BA=20=D0=B4=D0=BE=D0=BC=D0=B0=29?= Date: Thu, 7 Jun 2012 23:48:28 +0600 Subject: [PATCH] Fix compilation with clang classid_exit unnecessarily used gcc-only closure. conversion to simple static function works OK. --- lib/route/classid.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/route/classid.c b/lib/route/classid.c index da531bd..7b52de8 100644 --- a/lib/route/classid.c +++ b/lib/route/classid.c @@ -438,12 +438,13 @@ static void __init classid_init(void) fprintf(stderr, "Failed to read classid file: %s\n", nl_geterror(err)); } +static void free_map(void *map) { + free(((struct classid_map *)map)->name); + free(map); +}; + static void __exit classid_exit(void) { - void free_map(void *map) { - free(((struct classid_map *)map)->name); - free(map); - }; tdestroy(id_root, free_map); } /** @} */ -- 2.40.0