summaryrefslogtreecommitdiff
path: root/git-gui/lib/diff.tcl
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <stefanbeller@googlemail.com>2013-08-08 19:52:41 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-08-09 12:14:02 -0700
commitf8aae0b51743d5e5f35292caee41e5215b0e5bad (patch)
treeb782226712193a451e7fd54199088f68edb715ff /git-gui/lib/diff.tcl
parentdiff: fix a possible null pointer dereference (diff)
downloadtgif-f8aae0b51743d5e5f35292caee41e5215b0e5bad.tar.xz
rm: remove unneeded null pointer check
As of 7612a1efdb (2006-06-09 git-rm: honor -n flag.) the variable 'pathspec' seems to be assumed to be never NULL after calling get_pathspec There was a NULL pointer check after the seen = NULL assignment, which was removed by that commit. So if pathspec would be NULL now, we'd segfault in the line accessing the pathspec: for (i = 0; pathspec[i] ; i++) A few lines later, 'pathspec' still cannot be NULL, but that check was overlooked, hence removing it now. As the null pointer check was removed, it makes no sense to assign NULL to seen and 3 lines later another value as there are no conditions in between. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/diff.tcl')
0 files changed, 0 insertions, 0 deletions