aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/coopgammad.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/coopgammad.c b/src/coopgammad.c
index a2eddab..b93d0a7 100644
--- a/src/coopgammad.c
+++ b/src/coopgammad.c
@@ -660,7 +660,7 @@ static int print_method_and_site(int query)
return -1;
break;
}
- if (!methodname)
+ if (methodname != NULL)
if (printf("%s\n", methodname) < 0)
return -1;
}
@@ -698,10 +698,8 @@ static int print_method_and_site(int query)
return -1;
}
- if (close(STDOUT_FILENO) < 0)
- if (errno != EINTR)
- return -1;
-
+ if (fflush(stdout))
+ return -1;
return 0;
}