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:
Dan McGee 2011-11-01 19:17:26 -05:00
parent d98ff04cc9
commit 1953fe4368
1 changed files with 1 additions and 1 deletions

View File

@ -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);