Skip to content

Commit 4b721ce

Browse files
committed
Resolve returns in literals
1 parent be6b86d commit 4b721ce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_printf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int _printf(const char *format, ...)
2525
{
2626
write(2, "Cannot print null\n", 19);
2727
va_end(ap);
28-
exit(1);
28+
return (-1);
2929
}
3030

3131
while (*format)

print_literals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int print_string(va_list ap)
4646
{
4747
write(2, "Error", 6);
4848
va_end(ap);
49-
exit(1);
49+
return (-1);
5050
}
5151

5252
for (i = 0; i < byte_size; ++i)

0 commit comments

Comments
 (0)