Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-02-08 17:12:35 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2016-02-08 20:27:38 +0300
commitbdcbe0922d7099ebd61d875709ea9408bc1d7543 (patch)
treedf225a74a832eb528e0686d6286bd8a5282eb633 /tests/t0106-diff.sh
parenta8b9ef8c1c68fbb9c89db2d8c12dca38c15e2bfd (diff)
ui-stats: cast pointer before checking for zero
We abuse the "void *util" field as a counter and recently started to cast it to a uintptr_t to avoid risking nasal demons by performing arithmetic on a void pointer. However, compilers are also known to do "interesting" things if they know that a pointer is or isn't NULL. Make this safer by checking if the counter (after casting) is non-zero rather than checking if the pointer is non-null. Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'tests/t0106-diff.sh')
0 files changed, 0 insertions, 0 deletions