about summary refs log tree commit diff
path: root/COPYING
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 /COPYING
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 '')
0 files changed, 0 insertions, 0 deletions
Avoid the reserved _A names with BIT macroJune McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe On GNU, calling getopt_long again will reset optind back to the first non-option argument, which would cause an infinite loop of reading the same configurtion file forever. 2019-11-08Only change AWAY status for registered clientsJune McEnroe Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either. 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe This might reduce the frequency of a client getting its own message back because it was behind in the ring when it sent it. 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe