From: Alex Rousskov Date: Mon, 1 Nov 2010 20:45:08 +0000 (-0600) Subject: Changed safe_free() definition to eliminate multiple "ambiguous else" warnings. X-Git-Tag: take1~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2aa24bd9dd3aad4c427526648267ac166c12dd4d;p=thirdparty%2Fsquid.git Changed safe_free() definition to eliminate multiple "ambiguous else" warnings. --- diff --git a/compat/xalloc.h b/compat/xalloc.h index 14cb5dd65e..084c522522 100644 --- a/compat/xalloc.h +++ b/compat/xalloc.h @@ -60,7 +60,7 @@ void free_const(const void *s); * Define failure_notify to receive error message. * otherwise perror() is used to display it. */ -#define safe_free(x) if ((x)) { xxfree((x)); (x) = NULL; } else (void)0 +#define safe_free(x) while (x) { xxfree(x); (x) = NULL; } #if XMALLOC_STATISTICS