summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-10-28 21:25:17 +0200
committerLouis Burda <quent.burda@gmail.com>2023-10-28 21:25:17 +0200
commit0fc8c7b1e72475723406a0a8086897d3d05ffdbd (patch)
treedf4ab30a87fe2b1c22a70e2087cb5c1f82328d1e
parent0e7a061a6592b3dae5c7519a73d32579860b3560 (diff)
downloadpipeln-0fc8c7b1e72475723406a0a8086897d3d05ffdbd.tar.gz
pipeln-0fc8c7b1e72475723406a0a8086897d3d05ffdbd.zip
Make functions static and add noreturn attribute
-rw-r--r--pipeln.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pipeln.c b/pipeln.c
index 54ccb0e..f70f695 100644
--- 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;