comparison gui/interface.h @ 33282:3ce656827dd7

Use free() instead of gfree() in guiSetFilename and guiSetDF macros. The gfree() is pointless because there is a new assignment to the freed variable right afterwards. This also settles compiling issues with the Win32 part of the GUI reported by Stephen Sheldon, sfsheldo gmail com, who suggested the patch.
author ib
date Thu, 05 May 2011 08:51:33 +0000
parents 5f527a9a9521
children 733376438418
comparison
equal deleted inserted replaced
33281:0abc79c9142d 33282:3ce656827dd7
91 91
92 #define fsPersistant_MaxPos 5 92 #define fsPersistant_MaxPos 5
93 93
94 #define guiSetFilename(s, n) \ 94 #define guiSetFilename(s, n) \
95 { \ 95 { \
96 gfree((void **)&s); \ 96 free(s); \
97 s = gstrdup(n); \ 97 s = gstrdup(n); \
98 } 98 }
99 99
100 #define guiSetDF(s, d, n) \ 100 #define guiSetDF(s, d, n) \
101 { \ 101 { \
102 gfree((void **)&s); \ 102 free(s); \
103 s = malloc(strlen(d) + strlen(n) + 5); \ 103 s = malloc(strlen(d) + strlen(n) + 5); \
104 sprintf(s, "%s/%s", d, n); \ 104 sprintf(s, "%s/%s", d, n); \
105 } 105 }
106 106
107 typedef struct { 107 typedef struct {