Run Nindent on com32/lib/strncasecmp.c
authorH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:24 +0000 (15:10 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:24 +0000 (15:10 -0700)
Automatically reformat com32/lib/strncasecmp.c using Nindent.

Do this for all files except HDT, gPXE and externally maintained
libraries (zlib, tinyjpeg, libpng).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/lib/strncasecmp.c

index 3309d1a..8b8b967 100644 (file)
@@ -7,17 +7,17 @@
 
 int strncasecmp(const char *s1, const char *s2, size_t n)
 {
-  const unsigned char *c1 = s1, *c2 = s2;
-  unsigned char ch;
-  int d = 0;
+    const unsigned char *c1 = s1, *c2 = s2;
+    unsigned char ch;
+    int d = 0;
 
-  while ( n-- ) {
-    /* toupper() expects an unsigned char (implicitly cast to int)
-       as input, and returns an int, which is exactly what we want. */
-    d = toupper(ch = *c1++) - toupper(*c2++);
-    if ( d || !ch )
-      break;
-  }
+    while (n--) {
+       /* toupper() expects an unsigned char (implicitly cast to int)
+          as input, and returns an int, which is exactly what we want. */
+       d = toupper(ch = *c1++) - toupper(*c2++);
+       if (d || !ch)
+           break;
+    }
 
-  return d;
+    return d;
 }