diff options
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11,10 +11,12 @@ #define MIN(x,y) ((x) > (y) ? (y) : (x)) #define MAX(x,y) ((x) < (y) ? (y) : (x)) +#define PRINTABLE(c) ((c) >= 32 ? (c) : ' ') + #define ERR(...) fprintf(stderr, "ERR: " __VA_ARGS__) -#define NFREE(p) do { free(p); p = NULL; } while (0) -#define NFCLOSE(f) do { fclose(f); f = NULL; } while (0) +#define FREE(p) do { free(p); p = NULL; } while (0) +#define FCLOSE(f) do { if (f) fclose(f); f = NULL; } while (0) #define MHASHLEN 40 |
