From ed1e85d804242dca7feec6ef493d60051822498b Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Mon, 18 Apr 2022 09:27:05 -0500 Subject: use dprintf() instead of write() calls --- someblocks.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/someblocks.c b/someblocks.c index b4aa1c2..3530de6 100644 --- a/someblocks.c +++ b/someblocks.c @@ -1,3 +1,4 @@ +#define _POSIX_C_SOURCE 200809L #include #include #include @@ -142,9 +143,7 @@ void psomebar() return; } } - write(somebarFd, "status ", 7); - write(somebarFd, statusstr[0], strlen(statusstr[0])); - write(somebarFd, "\n", 1); + dprintf(somebarFd, "status %s\n", statusstr[0]); } -- cgit v1.2.3