From owner-cvs-src-old@FreeBSD.ORG Mon Jan 26 14:08:49 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D092A10656C7 for ; Mon, 26 Jan 2009 14:08:49 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BD1768FC16 for ; Mon, 26 Jan 2009 14:08:49 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n0QE8nS3027292 for ; Mon, 26 Jan 2009 14:08:49 GMT (envelope-from luigi@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n0QE8nN5027291 for cvs-src-old@freebsd.org; Mon, 26 Jan 2009 14:08:49 GMT (envelope-from luigi@repoman.freebsd.org) Message-Id: <200901261408.n0QE8nN5027291@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to luigi@repoman.freebsd.org using -f From: Luigi Rizzo Date: Mon, 26 Jan 2009 14:03:39 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/ipfw ipfw2.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2009 14:08:50 -0000 luigi 2009-01-26 14:03:39 UTC FreeBSD src repository Modified files: sbin/ipfw ipfw2.c Log: SVN rev 187713 on 2009-01-26 14:03:39Z by luigi Some implementations of getopt() expect that argv[0] is always the program name, and ignore that entry. ipfw2.c code instead skips this entry and starts with options at offset 0, relying on a more tolerant implementation of the library. This change fixes the issue by always passing a program name in the first entry to getopt. The motivation for this change is to remove a potential compatibility issue should we use a different getopt() implementation in the future. No functional changes. Submitted by: Marta Carbone (parts) MFC after: 4 weeks Revision Changes Path 1.136 +42 -27 src/sbin/ipfw/ipfw2.c