Skip to content

Commit

Permalink
Macro argument should be enclosed in parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
twogood committed Dec 2, 2017
1 parent 5db827c commit 917d3fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal.h
Expand Up @@ -95,12 +95,12 @@ uint8_t* unshield_header_get_buffer(Header* header, uint32_t offset);
Macros for safer development
*/

#define FREE(ptr) { if (ptr) { free(ptr); ptr = NULL; } }
#define FREE(ptr) { if (ptr) { free(ptr); (ptr) = NULL; } }
#define STRDUP(str) ((str) ? strdup(str) : NULL)
#define NEW(type, count) ((type*)calloc(count, sizeof(type)))
#define NEW1(type) ((type*)calloc(1, sizeof(type)))
#define FCLOSE(file) if (file) { fclose(file); file = NULL; }
#define FSIZE(file) (file ? unshield_fsize(file) : 0)
#define FCLOSE(file) if (file) { fclose(file); (file) = NULL; }
#define FSIZE(file) ((file) ? unshield_fsize(file) : 0)
#define STREQ(s1,s2) (0 == strcmp(s1,s2))

#if WORDS_BIGENDIAN
Expand Down

0 comments on commit 917d3fe

Please sign in to comment.