diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 23:36:20 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-12-08 23:36:20 +0100 |
commit | 2af3baffb58f22ddf3ac5944d2677b981763e03d (patch) | |
tree | 70d1dfc4ea490b053072b2ea68ad250b8a96972e /fitz/memento.c | |
parent | 62ff8552500694c96b998d2aac6fbc47ab2d9395 (diff) | |
download | mupdf-2af3baffb58f22ddf3ac5944d2677b981763e03d.tar.xz |
Stylistic changes when testing pointer values for NULL.
Also: use 'cannot' instead of 'failed to' in error messages.
Diffstat (limited to 'fitz/memento.c')
-rw-r--r-- | fitz/memento.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fitz/memento.c b/fitz/memento.c index 24e19e3a..c6677a0f 100644 --- a/fitz/memento.c +++ b/fitz/memento.c @@ -423,7 +423,7 @@ static void Memento_fin(void) globals.numFrees, globals.numReallocs); fprintf(stderr, "Average allocation size %d bytes\n", globals.totalAlloc/globals.numMallocs); - if (globals.used.head != NULL) { + if (globals.used.head) { Memento_listBlocks(); Memento_breakpoint(); } @@ -937,7 +937,7 @@ int Memento_find(void *a) data.blk = NULL; data.flags = 0; Memento_appBlocks(&globals.used, Memento_containsAddr, &data); - if (data.blk != NULL) { + if (data.blk) { fprintf(stderr, "Address 0x%p is in %sallocated block 0x%p(size=%d,num=%d)\n", data.addr, (data.flags == 1 ? "" : (data.flags == 2 ? @@ -948,7 +948,7 @@ int Memento_find(void *a) data.blk = NULL; data.flags = 0; Memento_appBlocks(&globals.free, Memento_containsAddr, &data); - if (data.blk != NULL) { + if (data.blk) { fprintf(stderr, "Address 0x%p is in %sfreed block 0x%p(size=%d,num=%d)\n", data.addr, (data.flags == 1 ? "" : (data.flags == 2 ? |