Date: Fri, 20 Nov 1998 23:37:35 -0700 From: "Justin T. Gibbs" <gibbs@plutotech.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: "Justin T. Gibbs" <gibbs@plutotech.com>, current@FreeBSD.ORG Subject: Re: snprintf() in the kernel Message-ID: <199811210644.XAA21642@pluto.plutotech.com> In-Reply-To: Your message of "Fri, 20 Nov 1998 22:38:16 PST." <199811210638.WAA21040@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
>::> >::> Boy, weren't we lucky that all BT model names were 4 characters! >:: >::Of course they are always 4 characters long. How do you think the programme >r >::determined the correct amount of space to allocate for the name information >::in the first place? >:: >::-- >::Justin > > Well, yes, but the obvious problem is that at some future point someone > adds a 5-character model and, BEWM. Which can't happen for a product line no longer being developed. I'm not saying that the changes are bad, but most kernel developers do put some thought into their design and its implications. For this very reason, most of the changes offered are for code that already functions correctly. > In general, this is why we need either snprintf()'s or very well > documented strncpy()'s. None of those strncpy()'s special 'expected' > side effects were documented at all, which is bad. They need to be > documented if they are going to remain in there. man strncpy -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811210644.XAA21642>
