]> git.cameronkatri.com Git - mandoc.git/blobdiff - test-fgetln.c
modernize style: "return" is not a function
[mandoc.git] / test-fgetln.c
index 90869cd89fd7b9c19a477df2f216243cf740dd98..c2abf06d29fb6b67815e2ce89817aae148814e7a 100644 (file)
@@ -1,11 +1,11 @@
+#include <sys/types.h>
 #include <stdio.h>
-#include <stdlib.h>
+#include <unistd.h>
 
 int
 main(void)
 {
-       char *cp;
        size_t sz;
-       cp = fgetln(stdin, &sz);
-       return 0;
+       fclose(stdin);
+       return fgetln(stdin, &sz) != NULL;
 }