commit: 65bb300cbf473e165025adbbfdcd0873a58e3b23
parent 064ef36538dd93de544ba8c01c7629a1b3d1ecf1
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 9 Jul 2021 02:58:29 +0200
bin/cat: format
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/bin/cat.c b/bin/cat.c
@@ -4,10 +4,10 @@
#define _POSIX_C_SOURCE 200809L
#include <errno.h> /* errno */
+#include <fcntl.h> /* open(), O_RDONLY */
#include <stdio.h> /* fprintf(), BUFSIZ */
-#include <unistd.h> /* read(), write(), close() */
#include <string.h> /* strerror(), strncmp() */
-#include <fcntl.h> /* open(), O_RDONLY */
+#include <unistd.h> /* read(), write(), close() */
int
concat(int fd, const char *fdname)
@@ -53,7 +53,8 @@ main(int argc, char *argv[])
else
{
int fd = open(argv[argi], O_RDONLY);
- if(fd < 0) {
+ if(fd < 0)
+ {
fprintf(stderr, "\nError opening ā%sā: %s\n", argv[argi], strerror(errno));
return 1;
}