Skip to content
  • Jeff King's avatar
    curl_trace(): eliminate switch fallthrough · d0e99839
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    Our trace handler is called by curl with a curl_infotype
    variable to interpret its data field. For most types we
    print the data and then break out of the switch. But for
    CURLINFO_TEXT, we print data and then fall through to the
    "default" case, which does the exact same thing (nothing!)
    that breaking out of the switch would.
    
    This is probably a leftover from an early iteration of the
    patch where the code after the switch _did_ do something
    interesting that was unique to the non-text case arms.
    But in its current form, this fallthrough is merely
    confusing (and causes gcc's -Wimplicit-fallthrough to
    complain).
    
    Let's make CURLINFO_TEXT like the other case arms, and push
    the default arm to the end where it's more obviously a
    catch-all.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    d0e99839