diff options
-rw-r--r-- | cfg.mk | 4 | ||||
-rw-r--r-- | libltdl/libltdl/lt__alloc.h | 8 |
2 files changed, 5 insertions, 7 deletions
@@ -62,7 +62,6 @@ local-checks-to-fix = \ local-checks-to-skip = \ $(local-checks-to-fix) \ sc_GPL_version \ - sc_avoid_if_before_free \ sc_bindtextdomain \ sc_cast_of_argument_to_free \ sc_cast_of_x_alloc_return_value \ @@ -72,8 +71,7 @@ local-checks-to-skip = \ # GPL_version: checks for GPLv3, which we don't use # bindtextdomain: libtool isn't internationalized -# avoid_if_before_free: we don't use the gnulib malloc modules -# cast_of_argument_to_free: ditto +# cast_of_argument_to_free: we don't use gnulib alloc modules # cast_of_x_alloc_return_value: ditto # error_message_uppercase: we like our error messages # program_name: libtool has no programs! diff --git a/libltdl/libltdl/lt__alloc.h b/libltdl/libltdl/lt__alloc.h index 1ceddf00..45f7b523 100644 --- a/libltdl/libltdl/lt__alloc.h +++ b/libltdl/libltdl/lt__alloc.h @@ -37,10 +37,10 @@ LT_BEGIN_C_DECLS #define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp)) #define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp)) -#define FREE(mem) LT_STMT_START { \ - if (mem) { free ((void *)mem); mem = NULL; } } LT_STMT_END -#define MEMREASSIGN(p, q) LT_STMT_START { \ - if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \ +#define FREE(mem) LT_STMT_START { \ + free ((void *)mem); mem = NULL; } LT_STMT_END +#define MEMREASSIGN(p, q) LT_STMT_START { \ + if ((p) != (q)) { free (p); (p) = (q); (q) = 0; } \ } LT_STMT_END /* If set, this function is called when memory allocation has failed. */ |