git: libevtr: Fix loop properly

John Marino marino at crater.dragonflybsd.org
Tue Feb 10 03:57:39 PST 2015


commit 0ed590e196a01ead6e59d96891e47b7dece038fe
Author: John Marino <draco at marino.st>
Date:   Tue Feb 10 12:51:37 2015 +0100

    libevtr: Fix loop properly
    
    The bruteforce fix should have used elements 0 - 2 because the strings
    array was defined as EVTR_NS_MAX - 1, not EVTR_NS_MAX.  So the fix was
    wrong, but it exposed the problem with the original code: the upper bound
    of the loop was set to EVTR_NS_MAX, not EVTR_NS_MAX - 1 like the "maps"
    version below it.
    
    This commit reverts the previous change and fixes the problem with the
    original code.
    
    spotted-by:	ivadasz

Summary of changes:
 lib/libevtr/evtr.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0ed590e196a01ead6e59d96891e47b7dece038fe


-- 
DragonFly BSD source repository



More information about the Commits mailing list