summaryrefslogtreecommitdiffabout
path: root/tests/chargen.c
Side-by-side diff
Diffstat (limited to 'tests/chargen.c') (more/less context) (ignore whitespace changes)
-rw-r--r--tests/chargen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/chargen.c b/tests/chargen.c
index a3b3290..75d096c 100644
--- a/tests/chargen.c
+++ b/tests/chargen.c
@@ -76,13 +76,20 @@ main (int argc, char **argv)
if (pies_url_create (&url, argv[1]))
{
- perror (argv[0]);
+ perror (argv[1]);
return 64;
}
fd = url_connect (url, NULL);
+ if (fd == -1)
+ return 1;
fp = fdopen (fd, "r");
-
+ if (!fp)
+ {
+ perror ("fdopen");
+ return 1;
+ }
+
first = next_char (0);
c = first;
do

Return to:

Send suggestions and report system problems to the System administrator.