From: uz Date: Thu, 6 Sep 2012 20:36:35 +0000 (+0000) Subject: Fixed problems reported by Greg King. X-Git-Tag: V2.14~254 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=640460deb5caec133af023ef65ea352cb53eaec4;p=cc65 Fixed problems reported by Greg King. git-svn-id: svn://svn.cc65.org/cc65/trunk@5819 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/testcode/lib/dir-test.c b/testcode/lib/dir-test.c index 479caa335..93fdcb7c4 100644 --- a/testcode/lib/dir-test.c +++ b/testcode/lib/dir-test.c @@ -27,14 +27,8 @@ int main(void) { char* name = "."; unsigned char go = 0; - register DIR *D; - struct dirent* E; - - D = opendir (name); - if (D == 0) { - printf("error opening %s: %s\n", name, strerror (errno)); - return 1; - } + DIR *D; + register struct dirent* E; /* Explain usage and wait for a key */ printf ("Use the following keys:\n" @@ -86,7 +80,7 @@ done: if (errno == 0) { printf ("Done\n"); } else { - printf("Done: %d (s)\n", errno, strerror (errno)); + printf("Done: %d (%s)\n", errno, strerror (errno)); } /* Close the directory */