summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/trans.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/trans.c')
-rw-r--r--lib/libalpm/trans.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c
index c042f099..523f33b8 100644
--- a/lib/libalpm/trans.c
+++ b/lib/libalpm/trans.c
@@ -324,8 +324,7 @@ static int grep(const char *fn, const char *needle)
while(!feof(fp)) {
char line[1024];
int sline = sizeof(line)-1;
- fgets(line, sline, fp);
- if(feof(fp)) {
+ if(fgets(line, sline, fp) == NULL) {
continue;
}
if(strstr(line, needle)) {