aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index 95e5341..937e1e4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -1,3 +1,4 @@
+#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
@@ -138,3 +139,11 @@ int run(const char *file, char *argv[])
return WEXITSTATUS(wstatus) == 0 ? 0 : -EPERM;
}
}
+
+char *trim(char *s)
+{
+ while (isspace(*s))
+ s++;
+
+ return s;
+}