(libretro-common) Start documenting leaf functon calls in function documentation

(libretro-common) docs - document when string has to be non-NULL or else UB (undefined behavior)
(libretro-common) stdstring.c - string_hex_to_unsigned - make strlen call unneeded
This commit is contained in:
LibretroAdmin 2022-08-01 09:52:39 +02:00
parent 20c4407928
commit c7a1d83675
6 changed files with 533 additions and 151 deletions

View file

@ -279,9 +279,7 @@ bool core_backup_get_backup_crc(char *backup_path, uint32_t *crc)
goto error;
/* Convert to an integer */
*crc = (uint32_t)string_hex_to_unsigned(crc_str);
if (*crc == 0)
if ((*crc = (uint32_t)string_hex_to_unsigned(crc_str)) == 0)
goto error;
string_list_free(metadata_list);