git: objformat: Avoid unnecessary getenv calls

John Marino marino at crater.dragonflybsd.org
Sun Feb 12 03:50:38 PST 2012


commit 2350540c6a2436184b8aedaa11309106d5527e5b
Author: John Marino <draco at marino.st>
Date:   Sun Feb 12 12:13:28 2012 +0100

    objformat: Avoid unnecessary getenv calls
    
    The CCVER and BINUTILSVERS are always checked by objformat, even when
    these values won't be used.  For example, there's no need to know the
    value of CCVER when executing the realelf binutils binary, but it was
    getting requested in all cases.
    
    This commit limits the getenv requests to the bare minimum required.
    Additionally it adds whitespace to the commands structure for the
    purpose of aesthetics.

Summary of changes:
 usr.bin/objformat/objformat.c |   64 +++++++++++++++++++++-------------------
 1 files changed, 34 insertions(+), 30 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2350540c6a2436184b8aedaa11309106d5527e5b


-- 
DragonFly BSD source repository





More information about the Commits mailing list