Skip to content
  • Chad Versace's avatar
    core: Change return type of wcore_attrib_list32_length · 6520bbd2
    Chad Versace authored
    
    
    Change from int32_t to size_t, because
        - Length is a measurement of unsigned "size".
        - In general, length values are often used in subsequent calculation
          of memory size which is passed to functions like malloc, whose
          input is size_t not int.
        - The cast from ptrdiff_t to int32_t in wcore_attrib_list_length
          just looked wrong. A cast to size_t makes more sense.
    
    As precedent, strlen() also returns size_t.
    
    Signed-off-by: default avatarChad Versace <chad.versace@intel.com>
    Tested-by: Emil Velikov <emil.l.velikov@gmail.com> (msvc/wgl)
    Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
    6520bbd2