зеркало из https://github.com/microsoft/git.git
strbuf: remove unnecessary NUL assignment in xstrdup_tolower()
Since 3733e69464
(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: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
8462ff43e4
Коммит
a8270b0980
1
strbuf.c
1
strbuf.c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче