From: H. Peter Anvin Date: Fri, 29 May 2009 22:10:32 +0000 (-0700) Subject: Run Nindent on libfat/cache.c X-Git-Tag: syslinux-3.83-pre2~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=247a297b057388f91e1f914a2c9a9014383df5d0;p=profile%2Fivi%2Fsyslinux.git Run Nindent on libfat/cache.c Automatically reformat libfat/cache.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin --- diff --git a/libfat/cache.c b/libfat/cache.c index 9e8df36..85b7ead 100644 --- a/libfat/cache.c +++ b/libfat/cache.c @@ -19,47 +19,47 @@ #include #include "libfatint.h" -void * libfat_get_sector(struct libfat_filesystem *fs, libfat_sector_t n) +void *libfat_get_sector(struct libfat_filesystem *fs, libfat_sector_t n) { - struct libfat_sector *ls; + struct libfat_sector *ls; - for ( ls = fs->sectors ; ls ; ls = ls->next ) { - if ( ls->n == n ) - return ls->data; /* Found in cache */ - } + for (ls = fs->sectors; ls; ls = ls->next) { + if (ls->n == n) + return ls->data; /* Found in cache */ + } - /* Not found in cache */ - ls = malloc(sizeof(struct libfat_sector)); - if ( !ls ) { - libfat_flush(fs); + /* Not found in cache */ ls = malloc(sizeof(struct libfat_sector)); + if (!ls) { + libfat_flush(fs); + ls = malloc(sizeof(struct libfat_sector)); - if ( !ls ) - return NULL; /* Can't allocate memory */ - } + if (!ls) + return NULL; /* Can't allocate memory */ + } - if ( fs->read(fs->readptr, ls->data, LIBFAT_SECTOR_SIZE, n) - != LIBFAT_SECTOR_SIZE ) { - free(ls); - return NULL; /* I/O error */ - } + if (fs->read(fs->readptr, ls->data, LIBFAT_SECTOR_SIZE, n) + != LIBFAT_SECTOR_SIZE) { + free(ls); + return NULL; /* I/O error */ + } - ls->n = n; - ls->next = fs->sectors; - fs->sectors = ls; + ls->n = n; + ls->next = fs->sectors; + fs->sectors = ls; - return ls->data; + return ls->data; } void libfat_flush(struct libfat_filesystem *fs) { - struct libfat_sector *ls, *lsnext; + struct libfat_sector *ls, *lsnext; - lsnext = fs->sectors; - fs->sectors = NULL; + lsnext = fs->sectors; + fs->sectors = NULL; - for ( ls = lsnext ; ls ; ls = lsnext ) { - lsnext = ls->next; - free(ls); - } + for (ls = lsnext; ls; ls = lsnext) { + lsnext = ls->next; + free(ls); + } }