From 12bef5624f3ff05ae6492da212044c478e91aae3 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 9 Dec 2006 19:26:58 +0100 Subject: [PATCH] fb-file: A couple of trivial cleanups. --- lib/fb-file.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/fb-file.c b/lib/fb-file.c index 9ef992a8..0dcf22a9 100644 --- a/lib/fb-file.c +++ b/lib/fb-file.c @@ -17,7 +17,7 @@ struct fb_file { struct fastbuf fb; - int fd; /* File descriptor, -1 if not a real file */ + int fd; /* File descriptor */ int is_temp_file; /* 0=normal file, 1=temporary file, delete on close, -1=shared FD */ }; #define FB_FILE(f) ((struct fb_file *)(f)->is_fastbuf) @@ -56,12 +56,10 @@ bfd_spout(struct fastbuf *f) static void bfd_seek(struct fastbuf *f, sh_off_t pos, int whence) { - sh_off_t l; - if (whence == SEEK_SET && pos == f->pos) return; - l = sh_seek(FB_FILE(f)->fd, pos, whence); + sh_off_t l = sh_seek(FB_FILE(f)->fd, pos, whence); if (l < 0) die("lseek on %s: %m", f->name); f->pos = l; @@ -168,7 +166,7 @@ bfilesync(struct fastbuf *b) #ifdef TEST -int main(int argc, char **argv) +int main(int argc UNUSED, char **argv UNUSED) { struct fastbuf *f, *t; -- 2.39.2