magic v14 master4-talloc-metze-3
authorStefan Metzmacher <metze@samba.org>
Mon, 10 Aug 2009 07:47:01 +0000 (09:47 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 12 Aug 2009 16:24:46 +0000 (18:24 +0200)
lib/talloc/talloc.c

index a79c8d05b23f3d0d084bba2fa95a2b4502bfe1c0..cf2292a02bca31812b532ddecc51328682df83ce 100644 (file)
@@ -39,9 +39,9 @@
 
 
 #define MAX_TALLOC_SIZE 0x10000000
-#define TALLOC_MAGIC_V1 0xe814ec70
-#define TALLOC_MAGIC_V2 0xe814ec80
-#define TALLOC_MAGIC    TALLOC_MAGIC_V2
+#define TALLOC_MAGIC_V13 0xe814ec70
+#define TALLOC_MAGIC_V14 0xe814ec80
+#define TALLOC_MAGIC    TALLOC_MAGIC_V14
 #define TALLOC_FLAG_FREE 0x01
 #define TALLOC_FLAG_LOOP 0x02
 #define TALLOC_FLAG_POOL 0x04          /* This is a talloc pool */
@@ -176,9 +176,9 @@ static void talloc_abort(const char *reason)
        talloc_abort_fn(reason);
 }
 
-static void talloc_abort_magic_v1(void)
+static void talloc_abort_magic_v13(void)
 {
-       talloc_abort("Bad talloc magic value - old magic v1 used");
+       talloc_abort("Bad talloc magic value - old magic v13 used");
 }
 
 static void talloc_abort_double_free(void)
@@ -197,8 +197,8 @@ static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
        const char *pp = (const char *)ptr;
        struct talloc_chunk *tc = discard_const_p(struct talloc_chunk, pp - TC_HDR_SIZE);
        if (unlikely((tc->flags & (TALLOC_FLAG_FREE | ~0xF)) != TALLOC_MAGIC)) { 
-               if ((tc->flags & (~0xF)) == TALLOC_MAGIC_V1) {
-                       talloc_abort_magic_v1();
+               if ((tc->flags & (~0xF)) == TALLOC_MAGIC_V13) {
+                       talloc_abort_magic_v13();
                        return NULL;
                }