tweaks: remove an unneeded check for NULL, and rename a parameter
(And if it were NULL, it should crash instead of passing over the bug.)
Этот коммит содержится в:
родитель
9923b073af
Коммит
eaa0f1a122
@ -160,10 +160,9 @@ bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Reduce the memory allocation of a string to what is needed. */
|
/* Reduce the memory allocation of a string to what is needed. */
|
||||||
void snuggly_fit(char **str)
|
void snuggly_fit(char **string)
|
||||||
{
|
{
|
||||||
if (*str != NULL)
|
*string = charealloc(*string, strlen(*string) + 1);
|
||||||
*str = charealloc(*str, strlen(*str) + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Null a string at a certain index and align it. */
|
/* Null a string at a certain index and align it. */
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user