Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: First hunk of diffs

From: Eivind Eklund <eivind(at)freebsd.org>
Date: Tue Apr 29 1997 - 19:08:22 EDT


At 04:51 PM 4/29/97 -0600, Warner Losh wrote:
>
>I've been running with these diffs now for some time. These seem

Some. What I'm not commenting looked OK.

>Index: libc/stdtime/localtime.c

Why should we deny . in names? Shouldn't that probably be a check for .. (or even better ../)?

>@@ -293,7 +298,7 @@

This change is bogus. It is OK to copy the exact number of bytes into a buffer, which is a case which is blocked by the change. (Yeah, the original is in a strange style.)

>@@ -306,7 +311,7 @@

Whitespace change. Please don't commit.

Do you need help?X

>Index: libftpio/ftpio.c
MIN(he->h_length,sizeof(sin.sin_addr)));
> }
>
> sin.sin_port = htons(port);

When you're in there, why not change to memmove? No reason not to go with the standard when it is functionally equvalent.

>Index: libskey/skeyaccess.c
in_addr))));
> list[i].s_addr = 0;

Please move the assignment out of the loop. Having it in the loop will likely slow down the loop for almost all compilers; it is _not_ candidate for compiler code motion, and will fource a read of hp->h_length. (There are non-obvious reasons for this; suffice to say it is nescessary to stay ISO C compliant. If GCC optimize it now, it is broken.)

Eivind Eklund perhaps(at)yes.no http://maybe.yes.no/perhaps/ eivind(at)freebsd.org Received on Tue Apr 29 17:09:09 1997

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:41:02 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library