Date: Sun, 18 Sep 2011 17:04:28 GMT From: Henning Petersen <henning.petersen@t-online.de> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/160806: Swapped argumets in xlint. Message-ID: <201109181704.p8IH4Sfb007445@red.freebsd.org> Resent-Message-ID: <201109181710.p8IHA80C031704@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160806
>Category: bin
>Synopsis: Swapped argumets in xlint.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Sep 18 17:10:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Henning Petersen
>Release: FreeBSD-current
>Organization:
>Environment:
>Description:
Swapped arguments in lseek.
>From NetBSD.
>How-To-Repeat:
>Fix:
diff -u -r1.28 xlint.c
--- usr.bin/xlint/xlint/xlint.c 5 Jan 2010 20:53:55 -0000 1.28
+++ usr.bin/xlint/xlint/xlint.c 18 Sep 2011 14:58:10 -0000
@@ -656,7 +656,7 @@
appcstrg(&args, name);
/* we reuse the same tmp file for cpp output, so rewind and truncate */
- if (lseek(cppoutfd, SEEK_SET, (off_t)0) != 0) {
+ if (lseek(cppoutfd, (off_t)0, SEEK_SET) != 0) {
warn("lseek");
terminate(-1);
}
Patch attached with submission follows:
diff -u -r1.28 xlint.c
--- usr.bin/xlint/xlint/xlint.c 5 Jan 2010 20:53:55 -0000 1.28
+++ usr.bin/xlint/xlint/xlint.c 18 Sep 2011 14:58:10 -0000
@@ -656,7 +656,7 @@
appcstrg(&args, name);
/* we reuse the same tmp file for cpp output, so rewind and truncate */
- if (lseek(cppoutfd, SEEK_SET, (off_t)0) != 0) {
+ if (lseek(cppoutfd, (off_t)0, SEEK_SET) != 0) {
warn("lseek");
terminate(-1);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109181704.p8IH4Sfb007445>
