summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--printf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/printf.c b/printf.c
index 67bf279..62a826f 100644
--- a/printf.c
+++ b/printf.c
@@ -91,7 +91,7 @@ static const char *echo(const char *s)
s++;
if (*s == 'c') {
- return NULL;
+ exit(errors);
}
if (*s == '0' || !isdigit(*s)) {
@@ -272,10 +272,6 @@ int printf_main(int argc, char *argv[])
putchar(*format);
format++;
}
-
- if (format == NULL) {
- break;
- }
}
if (count == 0) {