about summary refs log tree commit diff
path: root/ui-repolist.c
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2016-02-08 14:12:35 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2016-02-08 18:27:38 +0100
commitbdcbe0922d7099ebd61d875709ea9408bc1d7543 (patch)
treedf225a74a832eb528e0686d6286bd8a5282eb633 /ui-repolist.c
parentui-stats: if we're going to abuse void*, do it safely (diff)
downloadcgit-pink-bdcbe0922d7099ebd61d875709ea9408bc1d7543.tar.gz
cgit-pink-bdcbe0922d7099ebd61d875709ea9408bc1d7543.zip
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 'ui-repolist.c')
0 files changed, 0 insertions, 0 deletions
2020-02-17Add Four Tet — HandsJune McEnroe One from the cafe that caught my attention. 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe Apparently sometimes it didn't like receiving its own internal storage to parse again. Understandable. 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe Wow. One of the best I've read. 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe Broke out LDLIBS for each bin, and made everything more uniform. 2020-01-28Change scout sensitivity to 1.4June McEnroe idk it seems to work. 2020-01-28Import shows.txtJune McEnroe