Skip to content
  • René Scharfe's avatar
    use xstrncmpz() · f0e578c6
    René Scharfe authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Add and apply a semantic patch for calling xstrncmpz() to compare a
    NUL-terminated string with a buffer of a known length instead of using
    strncmp() and checking the terminating NUL explicitly.  This simplifies
    callers by reducing code duplication.
    
    I had to adjust remote.c manually because Coccinelle inexplicably
    changed the indent of the else branches.
    
    Signed-off-by: default avatarRené Scharfe <l.s.r@web.de>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    f0e578c6