From nobody@FreeBSD.org  Sun Sep 18 17:04:28 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D51D61065670
	for <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <freebsd-gnats-submit@FreeBSD.org>; 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 <henning.petersen@t-online.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Swapped argumets in xlint.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160806
>Category:       bin
>Synopsis:       [patch] Swapped lseek arguments in xlint(1)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jilles
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 18 17:10:08 UTC 2011
>Closed-Date:    Fri Jan 20 16:35:13 UTC 2012
>Last-Modified:  Fri Jan 20 16:35:13 UTC 2012
>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:
State-Changed-From-To: open->patched 
State-Changed-By: jilles 
State-Changed-When: Sat Nov 5 22:27:01 UTC 2011 
State-Changed-Why:  
Applied to 10-CURRENT, thanks. 


Responsible-Changed-From-To: freebsd-bugs->jilles 
Responsible-Changed-By: jilles 
Responsible-Changed-When: Sat Nov 5 22:27:01 UTC 2011 
Responsible-Changed-Why:  
Take. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160806 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160806: commit references a PR
Date: Sat,  5 Nov 2011 22:25:29 +0000 (UTC)

 Author: jilles
 Date: Sat Nov  5 22:25:15 2011
 New Revision: 227123
 URL: http://svn.freebsd.org/changeset/base/227123
 
 Log:
   lint: Fix lseek() argument order.
   
   Because SEEK_SET is 0, this seems to have no effect on the generated code.
   
   PR:		bin/160806
   Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
   Obtained from:	NetBSD
 
 Modified:
   head/usr.bin/xlint/xlint/xlint.c
 
 Modified: head/usr.bin/xlint/xlint/xlint.c
 ==============================================================================
 --- head/usr.bin/xlint/xlint/xlint.c	Sat Nov  5 21:56:45 2011	(r227122)
 +++ head/usr.bin/xlint/xlint/xlint.c	Sat Nov  5 22:25:15 2011	(r227123)
 @@ -656,7 +656,7 @@ fname(const char *name)
  	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);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160806: commit references a PR
Date: Fri, 20 Jan 2012 15:43:24 +0000 (UTC)

 Author: jilles
 Date: Fri Jan 20 15:43:08 2012
 New Revision: 230381
 URL: http://svn.freebsd.org/changeset/base/230381
 
 Log:
   MFC r227123: lint: Fix lseek() argument order.
   
   Because SEEK_SET is 0, this seems to have no effect on the generated code.
   
   PR:		bin/160806
   Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
   Obtained from:	NetBSD
 
 Modified:
   stable/9/usr.bin/xlint/xlint/xlint.c
 Directory Properties:
   stable/9/usr.bin/xlint/   (props changed)
 
 Modified: stable/9/usr.bin/xlint/xlint/xlint.c
 ==============================================================================
 --- stable/9/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 14:44:21 2012	(r230380)
 +++ stable/9/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 15:43:08 2012	(r230381)
 @@ -656,7 +656,7 @@ fname(const char *name)
  	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);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160806: commit references a PR
Date: Fri, 20 Jan 2012 15:44:51 +0000 (UTC)

 Author: jilles
 Date: Fri Jan 20 15:44:39 2012
 New Revision: 230382
 URL: http://svn.freebsd.org/changeset/base/230382
 
 Log:
   MFC r227123: lint: Fix lseek() argument order.
   
   Because SEEK_SET is 0, this seems to have no effect on the generated code.
   
   PR:		bin/160806
   Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
   Obtained from:	NetBSD
 
 Modified:
   stable/8/usr.bin/xlint/xlint/xlint.c
 Directory Properties:
   stable/8/usr.bin/xlint/   (props changed)
 
 Modified: stable/8/usr.bin/xlint/xlint/xlint.c
 ==============================================================================
 --- stable/8/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 15:43:08 2012	(r230381)
 +++ stable/8/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 15:44:39 2012	(r230382)
 @@ -655,7 +655,7 @@ fname(const char *name)
  	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);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/160806: commit references a PR
Date: Fri, 20 Jan 2012 15:47:00 +0000 (UTC)

 Author: jilles
 Date: Fri Jan 20 15:46:46 2012
 New Revision: 230383
 URL: http://svn.freebsd.org/changeset/base/230383
 
 Log:
   MFC r227123: lint: Fix lseek() argument order.
   
   Because SEEK_SET is 0, this seems to have no effect on the generated code.
   
   PR:		bin/160806
   Submitted by:	Henning Petersen <henning dot petersen at t-online dot de>
   Obtained from:	NetBSD
 
 Modified:
   stable/7/usr.bin/xlint/xlint/xlint.c
 Directory Properties:
   stable/7/usr.bin/xlint/   (props changed)
 
 Modified: stable/7/usr.bin/xlint/xlint/xlint.c
 ==============================================================================
 --- stable/7/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 15:44:39 2012	(r230382)
 +++ stable/7/usr.bin/xlint/xlint/xlint.c	Fri Jan 20 15:46:46 2012	(r230383)
 @@ -655,7 +655,7 @@ fname(const char *name)
  	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);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: jilles 
State-Changed-When: Fri Jan 20 16:34:37 UTC 2012 
State-Changed-Why:  
Fixed in head, stable/9, stable/8, stable/7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160806 
>Unformatted:
