Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Remove unnecessary optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ldorau committed Oct 10, 2017
1 parent 91e8c12 commit aa159c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,8 @@ str_replace_all(char **const text, const char *templt, const char *str)
memcpy(new_str, str, str_len);

/* fill the rest with spaces */
if (templt_len - str_len > 1) {
if (templt_len - str_len) {
memset(new_str + str_len, ' ', templt_len - str_len);
} else {
new_str[str_len] = ' ';
}

/* replace all */
Expand Down

0 comments on commit aa159c0

Please sign in to comment.