Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 May 1999 18:43:09 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Nick Hibma <hibma@skylink.it>
Cc:        FreeBSD hackers mailing list <hackers@freebsd.org>
Subject:   Re: names of globale variables 
Message-ID:  <199905040143.SAA01330@dingo.cdrom.com>
In-Reply-To: Your message of "Mon, 03 May 1999 23:20:35 %2B0200." <Pine.BSF.3.96.990503231631.3991A-100000@heidi.plazza.it> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905040143.SAA01330>