Module Name: src
Committed By: christos
Date: Wed Sep 21 14:33:35 UTC 2011
Modified Files:
src/usr.bin/gencat: gencat.c
Log Message:
PR/45385: Henning Petersen: Swapped arguments in lseek
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/usr.bin/gencat/gencat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/gencat/gencat.c
diff -u src/usr.bin/gencat/gencat.c:1.31 src/usr.bin/gencat/gencat.c:1.32
--- src/usr.bin/gencat/gencat.c:1.31 Sun Sep 4 16:27:05 2011
+++ src/usr.bin/gencat/gencat.c Wed Sep 21 10:33:35 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: gencat.c,v 1.31 2011/09/04 20:27:05 joerg Exp $ */
+/* $NetBSD: gencat.c,v 1.32 2011/09/21 14:33:35 christos Exp $ */
/*
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: gencat.c,v 1.31 2011/09/04 20:27:05 joerg Exp $");
+__RCSID("$NetBSD: gencat.c,v 1.32 2011/09/21 14:33:35 christos Exp $");
#endif
/***********************************************************
@@ -186,7 +186,7 @@
curfile = catfile;
updatecat = 1;
MCReadCat(ofd);
- if (lseek(ofd, SEEK_SET, 0) < 0) {
+ if (lseek(ofd, (off_t)0, SEEK_SET) == (off_t)-1) {
err(1, "Unable to seek on %s", catfile);
/* NOTREACHED */
}