From 87750a67895d31febd05d297f6886393cb49497a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Fri, 29 May 2009 15:10:25 -0700 Subject: [PATCH] Run Nindent on com32/lib/sys/opendev.c Automatically reformat com32/lib/sys/opendev.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin --- com32/lib/sys/opendev.c | 88 ++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/com32/lib/sys/opendev.c b/com32/lib/sys/opendev.c index 831c5a4..1df9d07 100644 --- a/com32/lib/sys/opendev.c +++ b/com32/lib/sys/opendev.c @@ -40,60 +40,60 @@ int opendev(const struct input_dev *idev, const struct output_dev *odev, int flags) { - int fd; - struct file_info *fp; - int okflags; - int e; + int fd; + struct file_info *fp; + int okflags; + int e; - okflags = (idev ? idev->fileflags : 0) | (odev ? odev->fileflags : 0); + okflags = (idev ? idev->fileflags : 0) | (odev ? odev->fileflags : 0); - if ( !(flags & 3) || (flags & ~okflags) ) { - errno = EINVAL; - return -1; - } + if (!(flags & 3) || (flags & ~okflags)) { + errno = EINVAL; + return -1; + } - for ( fd = 0, fp = __file_info ; fd < NFILES ; fd++, fp++ ) - if ( !fp->iop && !fp->oop ) - break; + for (fd = 0, fp = __file_info; fd < NFILES; fd++, fp++) + if (!fp->iop && !fp->oop) + break; - if ( fd >= NFILES ) { - errno = EMFILE; - return -1; - } + if (fd >= NFILES) { + errno = EMFILE; + return -1; + } - /* The file structure is already zeroed */ - fp->iop = &dev_error_r; - fp->oop = &dev_error_w; - fp->i.datap = fp->i.buf; + /* The file structure is already zeroed */ + fp->iop = &dev_error_r; + fp->oop = &dev_error_w; + fp->i.datap = fp->i.buf; - if (idev) { - if (idev->open && (e = idev->open(fp))) { - errno = e; - goto puke; + if (idev) { + if (idev->open && (e = idev->open(fp))) { + errno = e; + goto puke; + } + fp->iop = idev; } - fp->iop = idev; - } - while (odev) { - if (odev->open && (e = odev->open(fp))) { - if (e == EAGAIN) { - if (odev->fallback) { - odev = odev->fallback; - continue; - } else { - e = EIO; + while (odev) { + if (odev->open && (e = odev->open(fp))) { + if (e == EAGAIN) { + if (odev->fallback) { + odev = odev->fallback; + continue; + } else { + e = EIO; + } + } + errno = e; + goto puke; } - } - errno = e; - goto puke; + fp->oop = odev; + break; } - fp->oop = odev; - break; - } - return fd; + return fd; - puke: - close(fd); - return -1; +puke: + close(fd); + return -1; } -- 2.7.4