summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-07-14 11:44:16 +0200
committerLieuwe Rooijakkers <lieuwerooijakkers@gmail.com>2024-07-14 11:46:04 +0200
commit658487fc7d5ea7e14698b308a6552f22d61297f2 (patch)
treee7785cc96147c5becae0dc0bf948a5bb137fb077
parentc125c108d9228b6cb0589011df5f59fc8ee27333 (diff)
kat: gebruik fwrite
-rw-r--r--src/kat.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/kat.c b/src/kat.c
index 399e466..8a0fe59 100644
--- a/src/kat.c
+++ b/src/kat.c
@@ -44,11 +44,7 @@ static void process(const char *fname) {
exit(1);
}
- if (map->sb.st_size >= 0) {
- for (size_t i = 0; i < (size_t)map->sb.st_size; i++) {
- putchar(map->addr[i]);
- }
- }
+ fwrite(map->addr, 1, map->sb.st_size, stdout);
close_map(map);
}