Date: Wed, 8 Mar 2006 22:03:50 GMT From: Todd Miller <millert@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92994 for review Message-ID: <200603082203.k28M3oAa047581@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=92994 Change 92994 by millert@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); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603082203.k28M3oAa047581>