28 Jan
2014
28 Jan
'14
4:50 p.m.
Hi I ran smatch[1] on the pacman source code and it reported a few minor issues. Three out of four of the following patches are checks for NULL when freeing memory which are strictly not necessary since calling free with a NULL argument is a no-op. The last patch moves a NULL check before a pointer dereference which should be the correct place to put it. Cheers, Silvan [1] http://smatch.sourceforge.net/ Silvan Jegen (4): Remove unneeded NULL check Another unneeded NULL check removed Another NULL check removed Move NULL check before dereference src/pacman/pacman.c | 16 +++++++--------- src/pacman/util.c | 10 ++++------ src/util/pacsort.c | 5 +---- 3 files changed, 12 insertions(+), 19 deletions(-) -- 1.8.5.3