Re: [PATCH] Fix pointer comparison

2019-03-03 Thread Bruno Haible
Hi Michal, > it may make one think that the pointer is an int. > Use explicit comparison against NULL (or !ptr). I agree with you. Use of '0' to designate a NULL pointer is confusing to most of us. > lib/alloca.c | 10 +- > tests/test-tsearch.c | 2 +- Applied. > lib/getloada

[PATCH] Fix pointer comparison

2019-02-28 Thread Michal Privoznik
While generally it might be safe to compare pointer against literal 0, it may make one think that the pointer is an int. Use explicit comparison against NULL (or !ptr). Signed-off-by: Michal Privoznik --- lib/alloca.c | 10 +- lib/backup-find.c| 2 +- lib/bitset/list.c|