Replace g_ascii_strtoll() with FLUID_STRTOL() (#717)

This commit is contained in:
Carlo Bramini 2020-12-16 09:15:04 +01:00 committed by GitHub
parent 3719c58246
commit f15147d43a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -359,7 +359,7 @@ fluid_winmidi_parse_device_name(fluid_winmidi_driver_t *dev, char *dev_name)
{ {
/* try to convert current ascii index */ /* try to convert current ascii index */
char *end_idx = cur_idx; char *end_idx = cur_idx;
dev_idx = g_ascii_strtoll(cur_idx, &end_idx, 10); dev_idx = FLUID_STRTOL(cur_idx, &end_idx, 10);
if(cur_idx == end_idx /* not an integer number */ if(cur_idx == end_idx /* not an integer number */
|| dev_idx < 0 /* invalid device index */ || dev_idx < 0 /* invalid device index */

View file

@ -212,6 +212,7 @@ void* fluid_alloc(size_t len);
#define FLUID_STRCMP(_s,_t) strcmp(_s,_t) #define FLUID_STRCMP(_s,_t) strcmp(_s,_t)
#define FLUID_STRNCMP(_s,_t,_n) strncmp(_s,_t,_n) #define FLUID_STRNCMP(_s,_t,_n) strncmp(_s,_t,_n)
#define FLUID_STRCPY(_dst,_src) strcpy(_dst,_src) #define FLUID_STRCPY(_dst,_src) strcpy(_dst,_src)
#define FLUID_STRTOL(_s,_e,_b) strtol(_s,_e,_b)
#define FLUID_STRNCPY(_dst,_src,_n) \ #define FLUID_STRNCPY(_dst,_src,_n) \
do { strncpy(_dst,_src,_n-1); \ do { strncpy(_dst,_src,_n-1); \