From owner-freebsd-hackers Mon May 3 18:44:19 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (Postfix) with ESMTP id 3F4B3156B4 for ; Mon, 3 May 1999 18:44:18 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id SAA01330; Mon, 3 May 1999 18:43:09 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199905040143.SAA01330@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Nick Hibma Cc: FreeBSD hackers mailing list Subject: Re: names of globale variables In-reply-to: Your message of "Mon, 03 May 1999 23:20:35 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 03 May 1999 18:43:09 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > Isn't the choice of the variables names below a bit odd? It crashed my > machine three times because of a typo (buf instead of buffer) in the > USB Communications Class Driver. > > Wouldn't some more elaborate names be more appropriate to avoid these > problems? "struct buf" is actually a very longstanding BSD tradition. I don't think we would easily be able to rename it, no. > sys/buf.h: > > extern int nbuf; /* The number of buffer headers */ > extern struct buf *buf; /* The buffer headers. */ > extern char *buffers; /* The buffer contents. */ > extern int bufpages; /* Number of memory pages in the buffer */ -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message