From owner-freebsd-doc Wed Jul 1 07:01:10 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA20033 for freebsd-doc-outgoing; Wed, 1 Jul 1998 07:01:10 -0700 (PDT) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA20021 for ; Wed, 1 Jul 1998 07:01:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA28010; Wed, 1 Jul 1998 07:00:01 -0700 (PDT) Received: from relay.hq.tis.com (relay.hq.tis.com [192.94.214.100]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA19927 for ; Wed, 1 Jul 1998 07:00:09 -0700 (PDT) (envelope-from robert@trojanhorse.watson.org) Received: by relay.hq.tis.com; id JAA24993; Wed, 1 Jul 1998 09:55:55 -0400 (EDT) Received: from unknown(10.33.40.29) by relay.hq.tis.com via smap (4.0a) id xma024938; Wed, 1 Jul 98 09:55:19 -0400 Received: (from robert@localhost) by trojanhorse.watson.org (8.8.8/8.8.8) id AAA03312; Wed, 1 Jul 1998 00:20:55 -0400 (EDT) (envelope-from robert) Message-Id: <199807010420.AAA03312@trojanhorse.watson.org> Date: Wed, 1 Jul 1998 00:20:55 -0400 (EDT) From: robert@cyrus.watson.org Reply-To: robert+freebsd@cyrus.watson.org To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: docs/7138: man 9 malloc example inconsistent with prototype Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 7138 >Category: docs >Synopsis: man 9 malloc has incorrect example for MALLOC macro >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 1 07:00:01 PDT 1998 >Last-Modified: >Originator: Robert Watson >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: FreeBSD current >Description: man 9 MALLOC reports the following: ... MALLOC(space, cast, unsigned long size, struct malloc_type *type, int flags) ... But later in sample code: MALLOC(buf, sizeof *buf, struct foo_buf *, M_FOOBUF, M_NOWAIT); The sizeof *bug and struct foo_buf arguments are reversed. >How-To-Repeat: >Fix: replace with: MALLOC(bug, struct foo_buf *, sizeof *buf, M_FOOBAR, M_NOWAIT); Thanks.. >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message