mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Fix thinko in _alpm_strip_newline
The point of this early compare to NULL byte check was so we could bail early and skip the strcmp() call. Given we weren't doing the check right, this never exited early. Fix it to work as intended. Noticed-by: Pepe Juárez <trulustapa@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
d98ff04cc9
commit
1953fe4368
@ -221,7 +221,7 @@ char *_alpm_strtrim(char *str)
|
||||
size_t _alpm_strip_newline(char *str)
|
||||
{
|
||||
size_t len;
|
||||
if(str == '\0') {
|
||||
if(*str == '\0') {
|
||||
return 0;
|
||||
}
|
||||
len = strlen(str);
|
||||
|
Loading…
Reference in New Issue
Block a user