From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 18 17:10:09 2011 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47C7A106566B for ; Sun, 18 Sep 2011 17:10:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA358FC0A for ; Sun, 18 Sep 2011 17:10:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8IHA8Uf031705 for ; Sun, 18 Sep 2011 17:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8IHA80C031704; Sun, 18 Sep 2011 17:10:08 GMT (envelope-from gnats) Resent-Date: Sun, 18 Sep 2011 17:10:08 GMT Resent-Message-Id: <201109181710.p8IHA80C031704@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Henning Petersen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D51D61065670 for ; Sun, 18 Sep 2011 17:04:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id C542A8FC1C for ; Sun, 18 Sep 2011 17:04:28 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p8IH4Sl6007471 for ; Sun, 18 Sep 2011 17:04:28 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p8IH4Sfb007445; Sun, 18 Sep 2011 17:04:28 GMT (envelope-from nobody) Message-Id: <201109181704.p8IH4Sfb007445@red.freebsd.org> Date: Sun, 18 Sep 2011 17:04:28 GMT From: Henning Petersen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/160806: Swapped argumets in xlint. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 17:10:09 -0000 >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: