Skip to content
  • Marc Schink's avatar
    helper: Code cleanup for hexify() · 69ff7354
    Marc Schink authored
    
    
    Simplify hexify() and do not longer use 0 as special case for the
    parameter 'count' to determine the string length of the binary input.
    Instead, use strlen() outside of the function if needed.
    Additionally, fix the return value and return the length of the
    converted string. The old function always returned 2 * count.
    
    Also, use more appropriate data types for the function parameters and
    add a small documentation.
    
    Change-Id: I133a8ab786b8f7c1296afcaf9c0a0b43881e5112
    Signed-off-by: default avatarMarc Schink <openocd-dev@marcschink.de>
    Reviewed-on: http://openocd.zylin.com/3793
    
    
    Tested-by: jenkins
    Reviewed-by: default avatarTomas Vanek <vanekt@fbl.cz>
    69ff7354