PERFORCE change 92994 for review
Todd Miller
millert at FreeBSD.org
Wed Mar 8 14:04:08 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=92994
Change 92994 by millert at millert_g5tower on 2006/03/08 22:03:25
Cosmetic changes that improve readability (at least for me).
Affected files ...
.. //depot/projects/trustedbsd/sedarwin7/src/darwin/BootX/bootx.tproj/sl.subproj/main.c#3 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin7/src/darwin/BootX/bootx.tproj/sl.subproj/main.c#3 (text+ko) ====
@@ -638,16 +638,14 @@
args->exdatalen = 0;
char *prevname = "", propname[128];
- while (1) {
- if (1 != NextProp (gOptionsPH, prevname, propname))
- break;
+ while (NextProp (gOptionsPH, prevname, propname) == 1) {
prevname = propname;
if (!strncmp (propname, "load_", 5)) {
char pfilename[255];
- memset (pfilename, 0, 255);
- size = GetProp(gOptionsPH, propname, pfilename, 255);
+ memset (pfilename, 0, sizeof(pfilename));
+ size = GetProp(gOptionsPH, propname, pfilename, sizeof(pfilename));
- if (size > 0 && strlen(propname+4) < sizeof(int) * 4) {
+ if (size > 0 && strlen(propname+5) <= sizeof(int) * 4) {
char datfile[512];
strcpy (datfile, gRootDir);
strcat (datfile, pfilename);
@@ -658,9 +656,9 @@
}
else if (!strncmp (propname, "kenv_", 5)) {
char pvar[255];
- size = GetProp(gOptionsPH, propname, pvar, 255);
+ size = GetProp(gOptionsPH, propname, pvar, sizeof(pvar));
- if (size > 0 && strlen(propname+4) < sizeof(int) * 4)
+ if (size > 0 && strlen(propname+5) <= sizeof(int) * 4)
AddKernData (args, propname + 5, size, pvar);
}
}
More information about the trustedbsd-cvs
mailing list