From owner-p4-projects@FreeBSD.ORG Wed Mar 8 22:03:52 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E609C16A424; Wed, 8 Mar 2006 22:03:51 +0000 (GMT) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBFED16A422 for ; Wed, 8 Mar 2006 22:03:51 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B09B443D45 for ; Wed, 8 Mar 2006 22:03:50 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k28M3oCj047584 for ; Wed, 8 Mar 2006 22:03:50 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k28M3oAa047581 for perforce@freebsd.org; Wed, 8 Mar 2006 22:03:50 GMT (envelope-from millert@freebsd.org) Date: Wed, 8 Mar 2006 22:03:50 GMT Message-Id: <200603082203.k28M3oAa047581@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 92994 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 22:03:53 -0000 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); } }