Commit a8270b09 authored by Lars Schneider's avatar Lars Schneider Committed by Junio C Hamano

strbuf: remove unnecessary NUL assignment in xstrdup_tolower()

Since 3733e694 (use xmallocz to avoid size arithmetic, 2016-02-22) we
allocate the buffer for the lower case string with xmallocz(). This
already ensures a NUL at the end of the allocated buffer.

Remove the unnecessary assignment.
Signed-off-by: default avatarLars Schneider <larsxschneider@gmail.com>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 8462ff43
......@@ -781,7 +781,6 @@ char *xstrdup_tolower(const char *string)
result = xmallocz(len);
for (i = 0; i < len; i++)
result[i] = tolower(string[i]);
result[i] = '\0';
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment