diff options
author | unknown <guilhem@mysql.com> | 2005-10-13 00:24:14 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2005-10-13 00:24:14 +0200 |
commit | bec380588e9b4ca0db056d91d352c25a5dc9aa77 (patch) | |
tree | bbd2ff330e86869b4d2d70ea12bb6866c10a6ab2 /mysys/my_realloc.c | |
parent | e7ac9b928265a8138b26c2a4b297b4d4cc540073 (diff) | |
download | mariadb-git-bec380588e9b4ca0db056d91d352c25a5dc9aa77.tar.gz |
Building with compile-pentium-valgrind-max (without safemalloc) defines my_free() without flags,
so a typo on flags will go unnoticed; I put flags in this my_free() definition (as a no-op which
will still make the compiler check correctness of the flags). Applied: this caught a typo in my_realloc.c. Kindly approved by Konstantin and Mats.
include/my_sys.h:
When we define my_free(PTR,FG) to be my_no_flags_free(PTR) we don't make the compiler check
correctness of FG, which can hurt if another person build with a different definition of my_free;
so I add FG in the expression.
mysys/my_realloc.c:
typo found by the change in my_sys.h :)
Diffstat (limited to 'mysys/my_realloc.c')
-rw-r--r-- | mysys/my_realloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c index c8edb172890..a385bf1e530 100644 --- a/mysys/my_realloc.c +++ b/mysys/my_realloc.c @@ -52,7 +52,7 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags) if ((point = (char*)realloc(oldpoint,size)) == NULL) { if (my_flags & MY_FREE_ON_ERROR) - my_free(oldpoint,MyFLAGS); + my_free(oldpoint, my_flags); if (my_flags & MY_HOLD_ON_ERROR) DBUG_RETURN(oldpoint); my_errno=errno; |