aboutsummaryrefslogtreecommitdiff
path: root/tests/chargen.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chargen.c')
-rw-r--r--tests/chargen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/chargen.c b/tests/chargen.c
index a3b3290..75d096c 100644
--- a/tests/chargen.c
+++ b/tests/chargen.c
@@ -76,12 +76,19 @@ 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;

Return to:

Send suggestions and report system problems to the System administrator.