From owner-svn-src-head@FreeBSD.ORG Thu Jul 18 02:34:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 57099149; Thu, 18 Jul 2013 02:34:26 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0CECAB; Thu, 18 Jul 2013 02:34:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6I2YQoM033896; Thu, 18 Jul 2013 02:34:26 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6I2YQ2J033895; Thu, 18 Jul 2013 02:34:26 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307180234.r6I2YQ2J033895@svn.freebsd.org> From: Hiroki Sato Date: Thu, 18 Jul 2013 02:34:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253443 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jul 2013 02:34:26 -0000 Author: hrs Date: Thu Jul 18 02:34:25 2013 New Revision: 253443 URL: http://svnweb.freebsd.org/changeset/base/253443 Log: Fix a gcc warning. Pointy hat to: hrs Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Thu Jul 18 01:40:31 2013 (r253442) +++ head/sbin/route/route.c Thu Jul 18 02:34:25 2013 (r253443) @@ -1457,7 +1457,10 @@ rtmsg(int cmd, int flags, int fib) #define NEXTADDR(w, u) \ if (rtm_addrs & (w)) { \ - l = SA_SIZE((struct sockaddr *)&(u)); \ + l = (((struct sockaddr *)&(u))->sa_len == 0) ? \ + sizeof(long) : \ + 1 + ((((struct sockaddr *)&(u))->sa_len - 1) \ + | (sizeof(long) - 1)); \ memmove(cp, (char *)&(u), l); \ cp += l; \ if (verbose) \