talloc: Change the two other definitions of TALLOC_FREE to match the primary version
authorTim Prouty <tprouty@samba.org>
Sat, 24 Jan 2009 01:29:21 +0000 (17:29 -0800)
committerTim Prouty <tprouty@samba.org>
Sat, 24 Jan 2009 01:29:21 +0000 (17:29 -0800)
Eventually these two other definitions should be removed and all of
the TALLOC macros should live in the same header.  Until then, this
patch eliminates some build warnings.

nsswitch/pam_winbind.h
source3/libaddns/dns.h

index d21fc04a78aa95d90ef4a65344aaa13fe0eb7eea..0395a1fd5b91dc545ef315858e0fda0fa2354c0e 100644 (file)
@@ -171,6 +171,6 @@ struct pwb_context {
        uint32_t ctrl;
 };
 
-#define TALLOC_FREE(ctx) do { if ((ctx) != NULL) {talloc_free(ctx); ctx=NULL;} } while(0)
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
index 3f95c739d51c6b185a43962639437bf0630727dd..42662a224b0259de41692e0bd9ae5c0d0054f059 100644 (file)
@@ -133,7 +133,7 @@ void *talloc_zeronull(const void *context, size_t size, const char *name);
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)
 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
 #define talloc_destroy(ctx) talloc_free(ctx)
-#define TALLOC_FREE(ctx) do { if ((ctx) != NULL) {talloc_free(ctx); ctx=NULL;} } while(0)
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
 
 /*******************************************************************
    Type definitions for int16, int32, uint16 and uint32.  Needed