mirror of
https://github.com/claunia/flac.git
synced 2025-12-16 18:54:26 +00:00
minor tweaks
This commit is contained in:
@@ -205,7 +205,7 @@ AC_DEFINE(FLAC__USE_3DNOW)
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(exhaustive-tests,
|
AC_ARG_ENABLE(exhaustive-tests,
|
||||||
[ --enable-exhaustive-tests Enable exhaustive testing ("make check" will take a LONG time!)],
|
[ --enable-exhaustive-tests Enable exhaustive testing. "make check" will take a LONG time!],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) exhaustive_tests=true ;;
|
yes) exhaustive_tests=true ;;
|
||||||
no) exhaustive_tests=false ;;
|
no) exhaustive_tests=false ;;
|
||||||
|
|||||||
@@ -1056,29 +1056,29 @@ char *local_strdup(const char *source)
|
|||||||
FLAC__bool parse_md5(const char *src, FLAC__byte dest[16])
|
FLAC__bool parse_md5(const char *src, FLAC__byte dest[16])
|
||||||
{
|
{
|
||||||
unsigned i, d;
|
unsigned i, d;
|
||||||
char c;
|
int c;
|
||||||
FLAC__ASSERT(0 != src);
|
FLAC__ASSERT(0 != src);
|
||||||
if(strlen(src) != 32)
|
if(strlen(src) != 32)
|
||||||
return false;
|
return false;
|
||||||
/* strtoul() accepts negative numbers which we do not want, so we do it the hard way */
|
/* strtoul() accepts negative numbers which we do not want, so we do it the hard way */
|
||||||
for(i = 0; i < 16; i++) {
|
for(i = 0; i < 16; i++) {
|
||||||
c = *src++;
|
c = (int)(*src++);
|
||||||
if(isdigit(c))
|
if(isdigit(c))
|
||||||
d = (unsigned)c - (unsigned)'0';
|
d = (unsigned)(c - '0');
|
||||||
else if(c >= 'a' && c <= 'f')
|
else if(c >= 'a' && c <= 'f')
|
||||||
d = (unsigned)c - (unsigned)'a' + 10u;
|
d = (unsigned)(c - 'a') + 10u;
|
||||||
else if(c >= 'A' && c <= 'F')
|
else if(c >= 'A' && c <= 'F')
|
||||||
d = (unsigned)c - (unsigned)'A' + 10u;
|
d = (unsigned)(c - 'A') + 10u;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
d <<= 4;
|
d <<= 4;
|
||||||
c = *src++;
|
c = (int)(*src++);
|
||||||
if(isdigit(c))
|
if(isdigit(c))
|
||||||
d |= (unsigned)c - (unsigned)'0';
|
d |= (unsigned)(c - '0');
|
||||||
else if(c >= 'a' && c <= 'f')
|
else if(c >= 'a' && c <= 'f')
|
||||||
d |= (unsigned)c - (unsigned)'a' + 10u;
|
d |= (unsigned)(c - 'a') + 10u;
|
||||||
else if(c >= 'A' && c <= 'F')
|
else if(c >= 'A' && c <= 'F')
|
||||||
d |= (unsigned)c - (unsigned)'A' + 10u;
|
d |= (unsigned)(c - 'A') + 10u;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
dest[i] = (FLAC__byte)d;
|
dest[i] = (FLAC__byte)d;
|
||||||
|
|||||||
Reference in New Issue
Block a user