Changeset 434ffa2 for set.c


Ignore:
Timestamp:
2015-01-16T19:50:24Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
20c9c21
Parents:
85c3004
Message:

set_setint: use g_strdup_printf instead of relying on a char s[24];

File:
1 edited

Legend:

Unmodified
Added
Removed
  • set.c

    r85c3004 r434ffa2  
    175175int set_setint( set_t **head, const char *key, int value )
    176176{
    177         char s[24];     /* Not quite 128-bit clean eh? ;-) */
    178        
    179         g_snprintf( s, sizeof( s ), "%d", value );
    180         return set_setstr( head, key, s );
     177        char *s = g_strdup_printf( "%d", value );
     178        int retval = set_setstr( head, key, s );
     179        g_free( s );
     180        return retval;
    181181}
    182182
Note: See TracChangeset for help on using the changeset viewer.