From owner-svn-src-head@FreeBSD.ORG Tue Jun 15 08:53:15 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 068A61065677; Tue, 15 Jun 2010 08:53:15 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EA5A68FC1E; Tue, 15 Jun 2010 08:53:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5F8rDnS027693; Tue, 15 Jun 2010 08:53:13 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5F8rDPI027691; Tue, 15 Jun 2010 08:53:13 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201006150853.o5F8rDPI027691@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 15 Jun 2010 08:53:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209194 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 15 Jun 2010 08:53:15 -0000 Author: ae Date: Tue Jun 15 08:53:13 2010 New Revision: 209194 URL: http://svn.freebsd.org/changeset/base/209194 Log: * Include sys/systm.h for KASSERT() * Remove unneeded includes and comment * Replace home made OFFSETOF() macro with standard offsetof() Pointed out by: bde Approved by: kib (mentor) Modified: head/sys/netgraph/ng_patch.c Modified: head/sys/netgraph/ng_patch.c ============================================================================== --- head/sys/netgraph/ng_patch.c Tue Jun 15 07:06:54 2010 (r209193) +++ head/sys/netgraph/ng_patch.c Tue Jun 15 08:53:13 2010 (r209194) @@ -29,10 +29,9 @@ __FBSDID("$FreeBSD$"); #include +#include #include -#include -#include /* be64toh(), htobe64() */ -#include +#include #include #include #include @@ -47,8 +46,6 @@ static ng_newhook_t ng_patch_newhook; static ng_rcvdata_t ng_patch_rcvdata; static ng_disconnect_t ng_patch_disconnect; -#define OFFSETOF(s, e) ((char *)&((s *)0)->e - (char *)((s *)0)) - static int ng_patch_config_getlen(const struct ng_parse_type *type, const u_char *start, const u_char *buf) @@ -56,7 +53,7 @@ ng_patch_config_getlen(const struct ng_p const struct ng_patch_config *p; p = (const struct ng_patch_config *)(buf - - OFFSETOF(struct ng_patch_config, ops)); + offsetof(struct ng_patch_config, ops)); return (p->count); }