Changeset 1794


Ignore:
Timestamp:
Jul 6, 2007, 10:47:51 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Renamed ranges_static into static_ranges.
Location:
zzuf/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/fd.c

    r1792 r1794  
    4646/* File descriptor cherry picking */
    4747static int *ranges = NULL;
    48 static int ranges_static[512];
     48static int static_ranges[512];
    4949
    5050/* File descriptor stuff. When program is launched, we use the static array of
     
    9999void _zz_pick(char const *list)
    100100{   
    101     /* TODO: free(ranges) if ranges != ranges_static */
    102     ranges = _zz_allocrange(list, ranges_static);
     101    ranges = _zz_allocrange(list, static_ranges);
    103102}
    104103
     
    191190    if(fds != static_fds)
    192191        free(fds);
     192    if(ranges != static_ranges)
     193        free(ranges);
    193194}
    194195
  • zzuf/trunk/src/fuzz.c

    r1792 r1794  
    4747/* Per-offset byte protection */
    4848static int *ranges = NULL;
    49 static int ranges_static[512];
     49static int static_ranges[512];
    5050
    5151/* Per-value byte protection */
     
    6969void _zz_bytes(char const *list)
    7070{
    71     /* TODO: free(ranges) if ranges != ranges_static */
    72     ranges = _zz_allocrange(list, ranges_static);
     71    /* TODO: free(ranges) if ranges != static_ranges */
     72    ranges = _zz_allocrange(list, static_ranges);
    7373}
    7474
  • zzuf/trunk/src/ranges.c

    r1792 r1794  
    3333 * understood by cut(1) such as "1-5,8,10-" into a C array for lookup.
    3434 * If more than 256 slots are required, new memory is allocated, otherwise
    35  * the static array ranges_static is used. It is the caller's duty to call
    36  * free() if the returned value is not ranges_static. */
    37 int *_zz_allocrange(char const *list, int *ranges_static)
     35 * the static array static_ranges is used. It is the caller's duty to call
     36 * free() if the returned value is not static_ranges. */
     37int *_zz_allocrange(char const *list, int *static_ranges)
    3838{
    3939    char const *parser;
     
    4949        ranges = malloc((chunks + 1) * 2 * sizeof(unsigned int));
    5050    else
    51         ranges = ranges_static;
     51        ranges = static_ranges;
    5252
    5353    /* Fill ranges list */
Note: See TracChangeset for help on using the changeset viewer.