commit 0fc8c7b1e72475723406a0a8086897d3d05ffdbd
parent 0e7a061a6592b3dae5c7519a73d32579860b3560
Author: Louis Burda <quent.burda@gmail.com>
Date: Sat, 28 Oct 2023 21:25:17 +0200
Make functions static and add noreturn attribute
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pipeln.c b/pipeln.c
@@ -11,7 +11,8 @@
#include <string.h>
#include <stdlib.h>
-void __attribute__((noreturn))
+static void
+__attribute__((noreturn))
die(const char *fmt, ...)
{
va_list ap;
@@ -30,7 +31,7 @@ die(const char *fmt, ...)
exit(1);
}
-char *
+static char *
findbin(const char *name)
{
static char pathbuf[PATH_MAX];
@@ -68,7 +69,7 @@ findbin(const char *name)
die("findbin %s", name);
}
-pid_t
+static pid_t
run(int *in, int *out, const char **argv)
{
pid_t child;
@@ -104,7 +105,8 @@ run(int *in, int *out, const char **argv)
return child;
}
-void
+static void
+__attribute__((noreturn))
waitall(pid_t tpid)
{
int status, exitcode;