summaryrefslogtreecommitdiff
path: root/src/minutils/s6-mount.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-03-08 12:17:31 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-03-08 12:17:31 +0000
commit495d625add9e52b29a98c4fa2627a45d20d44849 (patch)
tree4927b430b4115c3217965fa08a9aba76fe809422 /src/minutils/s6-mount.c
parentfa3f206449c7c54afedbc2c7d4107a73e55c204a (diff)
downloads6-linux-utils-495d625add9e52b29a98c4fa2627a45d20d44849.tar.xz
Make it build with skalibs-2.5.0.0
Diffstat (limited to 'src/minutils/s6-mount.c')
-rw-r--r--src/minutils/s6-mount.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/minutils/s6-mount.c b/src/minutils/s6-mount.c
index bb6db81..fe218c2 100644
--- a/src/minutils/s6-mount.c
+++ b/src/minutils/s6-mount.c
@@ -1,11 +1,12 @@
/* ISC license. */
+#include <string.h>
#include <errno.h>
#include <sys/mount.h>
#include <mntent.h>
#include <stdio.h>
-#include <skalibs/sgetopt.h>
#include <skalibs/bytestr.h>
+#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
#include <skalibs/stralloc.h>
#include <skalibs/djbunix.h>
@@ -16,14 +17,13 @@
#define SWITCH(opt) do
#define HCTIWS(opt) while(0) ;
-#define CASE(s) if (n == sizeof(s) - 1 && !str_diffn(opt, (s), n))
+#define CASE(s) if (n == sizeof(s) - 1 && !strncmp(opt, (s), n))
static void scanopt (stralloc *data, unsigned long *flags, char const *opt)
{
for (;;)
{
- register unsigned int n = str_chr(opt, ',') ;
-
+ unsigned int n = str_chr(opt, ',') ;
SWITCH(opt)
{
CASE("defaults") { *flags = MS_MGC_VAL ; break ; }
@@ -98,7 +98,7 @@ int main (int argc, char const *const *argv)
subgetopt_t l = SUBGETOPT_ZERO ;
for (;;)
{
- register int opt = subgetopt_r(argc, argv, "nz:arwt:o:", &l) ;
+ int opt = subgetopt_r(argc, argv, "nz:arwt:o:", &l) ;
if (opt == -1) break ;
switch (opt)
{