summaryrefslogtreecommitdiff
path: root/libfat
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:32 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:32 -0700
commit247a297b057388f91e1f914a2c9a9014383df5d0 (patch)
tree4fb3e3d7be484a7fac36d42969f3d9fe4946ce2c /libfat
parent64247acf51e0581070e60c062a593da4a7a46abc (diff)
downloadsyslinux-247a297b057388f91e1f914a2c9a9014383df5d0.tar.gz
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 <hpa@zytor.com>
Diffstat (limited to 'libfat')
-rw-r--r--libfat/cache.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/libfat/cache.c b/libfat/cache.c
index 9e8df361..85b7eadf 100644
--- a/libfat/cache.c
+++ b/libfat/cache.c
@@ -19,47 +19,47 @@
#include <stdlib.h>
#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);
+ }
}