Run Nindent on com32/lib/sys/close.c
authorH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:25 +0000 (15:10 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 29 May 2009 22:10:25 +0000 (15:10 -0700)
Automatically reformat com32/lib/sys/close.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/sys/close.c

index e8421b9..50d9a42 100644 (file)
 
 int close(int fd)
 {
-  struct file_info *fp = &__file_info[fd];
-  int rv = 0;
+    struct file_info *fp = &__file_info[fd];
+    int rv = 0;
 
-  if ( fd >= NFILES || !fp->iop || !fp->oop ) {
-    errno = EBADF;
-    return -1;
-  }
+    if (fd >= NFILES || !fp->iop || !fp->oop) {
+       errno = EBADF;
+       return -1;
+    }
 
-  if ( fp->iop->close ) {
-    rv = fp->iop->close(fp);
-    if ( rv )
-      return rv;
-  }
-  fp->iop = &dev_error_r;
+    if (fp->iop->close) {
+       rv = fp->iop->close(fp);
+       if (rv)
+           return rv;
+    }
+    fp->iop = &dev_error_r;
 
-  if ( fp->oop->close ) {
-    rv = fp->oop->close(fp);
-    if ( rv )
-      return rv;
-  }
+    if (fp->oop->close) {
+       rv = fp->oop->close(fp);
+       if (rv)
+           return rv;
+    }
 
-  memset(fp, 0, sizeof *fp);   /* File structure unused */
-  return 0;
+    memset(fp, 0, sizeof *fp); /* File structure unused */
+    return 0;
 }