summaryrefslogtreecommitdiff
path: root/t/t1013/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e
diff options
context:
space:
mode:
authorLibravatar René Scharfe <l.s.r@web.de>2014-06-01 11:00:40 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-06-02 13:30:18 -0700
commitb1a013dd6a79826675138cf9bdfaf18fafa786ba (patch)
treeea956884bdd7c45a7412d6e28ce510ddae5425cb /t/t1013/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e
parentGit 1.8.5.5 (diff)
downloadtgif-b1a013dd6a79826675138cf9bdfaf18fafa786ba.tar.xz
mailinfo: use strcmp() for string comparison
The array header is defined as: static const char *header[MAX_HDR_PARSED] = { "From","Subject","Date", }; When looking for the index of a specfic string in that array, simply use strcmp() instead of memcmp(). This avoids running over the end of the string (e.g. with memcmp("Subject", "From", 7)) and gets rid of magic string length constants. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1013/objects/2e/65efe2a145dda7ee51d1741299f848e5bf752e')
0 files changed, 0 insertions, 0 deletions