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.)
master
Benno Schulenberg 2018-11-05 13:04:07 +01:00
parent 9923b073af
commit eaa0f1a122
1 changed files with 2 additions and 3 deletions

View File

@ -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. */
void snuggly_fit(char **str)
void snuggly_fit(char **string)
{
if (*str != NULL)
*str = charealloc(*str, strlen(*str) + 1);
*string = charealloc(*string, strlen(*string) + 1);
}
/* Null a string at a certain index and align it. */