From: Jan <cloux@rote.ch>
Date: Sat, 2 Mar 2019 21:47:29 +0100
Subject: fix: 34 cases of -Wmisleading-indentation warnings

 - fixed misleading indentation as reported by gcc 8.2.0
---
 runit-2.1.2/src/byte_chr.c  | 16 ++++++++++++----
 runit-2.1.2/src/byte_copy.c | 12 ++++++++----
 runit-2.1.2/src/byte_cr.c   | 12 ++++++++----
 runit-2.1.2/src/byte_diff.c | 16 ++++++++++++----
 runit-2.1.2/src/byte_rchr.c | 16 ++++++++++++----
 runit-2.1.2/src/chpst.c     |  6 ++++--
 runit-2.1.2/src/str_chr.c   | 16 ++++++++++++----
 runit-2.1.2/src/str_len.c   | 12 ++++++++----
 runit-2.1.2/src/sv.c        |  3 ++-
 runit-2.1.2/src/svlogd.c    | 25 ++++++++++++++++++-------
 10 files changed, 96 insertions(+), 38 deletions(-)

diff --git a/runit-2.1.2/src/byte_chr.c b/runit-2.1.2/src/byte_chr.c
index fd56056..020b230 100644
--- a/runit-2.1.2/src/byte_chr.c
+++ b/runit-2.1.2/src/byte_chr.c
@@ -13,10 +13,18 @@ int c;
   ch = c;
   t = s;
   for (;;) {
-    if (!n) break; if (*t == ch) break; ++t; --n;
-    if (!n) break; if (*t == ch) break; ++t; --n;
-    if (!n) break; if (*t == ch) break; ++t; --n;
-    if (!n) break; if (*t == ch) break; ++t; --n;
+    if (!n) break;
+    if (*t == ch) break;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) break;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) break;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) break;
+    ++t; --n;
   }
   return t - s;
 }
diff --git a/runit-2.1.2/src/byte_copy.c b/runit-2.1.2/src/byte_copy.c
index 74c9e4a..d33dacd 100644
--- a/runit-2.1.2/src/byte_copy.c
+++ b/runit-2.1.2/src/byte_copy.c
@@ -8,9 +8,13 @@ register unsigned int n;
 register char *from;
 {
   for (;;) {
-    if (!n) return; *to++ = *from++; --n;
-    if (!n) return; *to++ = *from++; --n;
-    if (!n) return; *to++ = *from++; --n;
-    if (!n) return; *to++ = *from++; --n;
+    if (!n) return;
+    *to++ = *from++; --n;
+    if (!n) return;
+    *to++ = *from++; --n;
+    if (!n) return;
+    *to++ = *from++; --n;
+    if (!n) return;
+    *to++ = *from++; --n;
   }
 }
diff --git a/runit-2.1.2/src/byte_cr.c b/runit-2.1.2/src/byte_cr.c
index 52dc251..b17300e 100644
--- a/runit-2.1.2/src/byte_cr.c
+++ b/runit-2.1.2/src/byte_cr.c
@@ -10,9 +10,13 @@ register char *from;
   to += n;
   from += n;
   for (;;) {
-    if (!n) return; *--to = *--from; --n;
-    if (!n) return; *--to = *--from; --n;
-    if (!n) return; *--to = *--from; --n;
-    if (!n) return; *--to = *--from; --n;
+    if (!n) return;
+    *--to = *--from; --n;
+    if (!n) return;
+    *--to = *--from; --n;
+    if (!n) return;
+    *--to = *--from; --n;
+    if (!n) return;
+    *--to = *--from; --n;
   }
 }
diff --git a/runit-2.1.2/src/byte_diff.c b/runit-2.1.2/src/byte_diff.c
index 0c4d17b..7abc766 100644
--- a/runit-2.1.2/src/byte_diff.c
+++ b/runit-2.1.2/src/byte_diff.c
@@ -8,10 +8,18 @@ register unsigned int n;
 register char *t;
 {
   for (;;) {
-    if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
-    if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
-    if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
-    if (!n) return 0; if (*s != *t) break; ++s; ++t; --n;
+    if (!n) return 0;
+    if (*s != *t) break;
+    ++s; ++t; --n;
+    if (!n) return 0;
+    if (*s != *t) break;
+    ++s; ++t; --n;
+    if (!n) return 0;
+    if (*s != *t) break;
+    ++s; ++t; --n;
+    if (!n) return 0;
+    if (*s != *t) break;
+    ++s; ++t; --n;
   }
   return ((int)(unsigned int)(unsigned char) *s)
        - ((int)(unsigned int)(unsigned char) *t);
diff --git a/runit-2.1.2/src/byte_rchr.c b/runit-2.1.2/src/byte_rchr.c
index 7ea9948..35db62d 100644
--- a/runit-2.1.2/src/byte_rchr.c
+++ b/runit-2.1.2/src/byte_rchr.c
@@ -15,10 +15,18 @@ int c;
   t = s;
   u = 0;
   for (;;) {
-    if (!n) break; if (*t == ch) u = t; ++t; --n;
-    if (!n) break; if (*t == ch) u = t; ++t; --n;
-    if (!n) break; if (*t == ch) u = t; ++t; --n;
-    if (!n) break; if (*t == ch) u = t; ++t; --n;
+    if (!n) break;
+    if (*t == ch) u = t;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) u = t;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) u = t;
+    ++t; --n;
+    if (!n) break;
+    if (*t == ch) u = t;
+    ++t; --n;
   }
   if (!u) u = t;
   return u - s;
diff --git a/runit-2.1.2/src/chpst.c b/runit-2.1.2/src/chpst.c
index 2b9eb01..8de213f 100644
--- a/runit-2.1.2/src/chpst.c
+++ b/runit-2.1.2/src/chpst.c
@@ -309,12 +309,14 @@ int main(int argc, char **argv) {
     case 'n':
       switch (*optarg) {
         case '-':
-          if (optarg[scan_ulong(++optarg, &ul)]) usage(); nicelvl =ul;
+          if (optarg[scan_ulong(++optarg, &ul)]) usage();
+          nicelvl =ul;
           nicelvl *=-1;
           break;
         case '+': ++optarg;
         default:
-          if (optarg[scan_ulong(optarg, &ul)]) usage(); nicelvl =ul;
+          if (optarg[scan_ulong(optarg, &ul)]) usage();
+          nicelvl =ul;
           break;
       }
       break;
diff --git a/runit-2.1.2/src/str_chr.c b/runit-2.1.2/src/str_chr.c
index 9b467eb..a29d600 100644
--- a/runit-2.1.2/src/str_chr.c
+++ b/runit-2.1.2/src/str_chr.c
@@ -10,10 +10,18 @@ unsigned int str_chr(register const char *s,int c)
   ch = c;
   t = s;
   for (;;) {
-    if (!*t) break; if (*t == ch) break; ++t;
-    if (!*t) break; if (*t == ch) break; ++t;
-    if (!*t) break; if (*t == ch) break; ++t;
-    if (!*t) break; if (*t == ch) break; ++t;
+    if (!*t) break;
+    if (*t == ch) break;
+    ++t;
+    if (!*t) break;
+    if (*t == ch) break;
+    ++t;
+    if (!*t) break;
+    if (*t == ch) break;
+    ++t;
+    if (!*t) break;
+    if (*t == ch) break;
+    ++t;
   }
   return t - s;
 }
diff --git a/runit-2.1.2/src/str_len.c b/runit-2.1.2/src/str_len.c
index dedd005..38c6e28 100644
--- a/runit-2.1.2/src/str_len.c
+++ b/runit-2.1.2/src/str_len.c
@@ -8,9 +8,13 @@ unsigned int str_len(const char *s)
 
   t = s;
   for (;;) {
-    if (!*t) return t - s; ++t;
-    if (!*t) return t - s; ++t;
-    if (!*t) return t - s; ++t;
-    if (!*t) return t - s; ++t;
+    if (!*t) return t - s;
+    ++t;
+    if (!*t) return t - s;
+    ++t;
+    if (!*t) return t - s;
+    ++t;
+    if (!*t) return t - s;
+    ++t;
   }
 }
diff --git a/runit-2.1.2/src/sv.c b/runit-2.1.2/src/sv.c
index 5b59159..6cc2a8b 100644
--- a/runit-2.1.2/src/sv.c
+++ b/runit-2.1.2/src/sv.c
@@ -290,7 +290,8 @@ int main(int argc, char **argv) {
     }
   }
   argv +=optind; argc -=optind;
-  if (!(action =*argv++)) usage(); --argc;
+  if (!(action =*argv++)) usage();
+  --argc;
   if (!lsb) { service =argv; services =argc; }
   if (!*service) usage();
 
diff --git a/runit-2.1.2/src/svlogd.c b/runit-2.1.2/src/svlogd.c
index a80b1fc..f433669 100644
--- a/runit-2.1.2/src/svlogd.c
+++ b/runit-2.1.2/src/svlogd.c
@@ -390,13 +390,24 @@ unsigned int ip4_scan(const char *s,char ip[4])
   unsigned long u;
  
   len = 0;
-  i = scan_ulong(s,&u); if (!i) return 0; ip[0] = u; s += i; len += i;
-  if (*s != '.') return 0; ++s; ++len;
-  i = scan_ulong(s,&u); if (!i) return 0; ip[1] = u; s += i; len += i;
-  if (*s != '.') return 0; ++s; ++len;
-  i = scan_ulong(s,&u); if (!i) return 0; ip[2] = u; s += i; len += i;
-  if (*s != '.') return 0; ++s; ++len;
-  i = scan_ulong(s,&u); if (!i) return 0; ip[3] = u; s += i; len += i;
+  i = scan_ulong(s,&u);
+  if (!i) return 0;
+  ip[0] = u; s += i; len += i;
+  if (*s != '.') return 0;
+  ++s; ++len;
+  i = scan_ulong(s,&u);
+  if (!i) return 0;
+  ip[1] = u; s += i; len += i;
+  if (*s != '.') return 0;
+  ++s; ++len;
+  i = scan_ulong(s,&u);
+  if (!i) return 0;
+  ip[2] = u; s += i; len += i;
+  if (*s != '.') return 0;
+  ++s; ++len;
+  i = scan_ulong(s,&u);
+  if (!i) return 0;
+  ip[3] = u; s += i; len += i;
   return len;
 }
 
