Changeset 1064 in MondoRescue for branches/stable/mondo/src/lib/mr_mem.c


Ignore:
Timestamp:
Jan 23, 2007, 1:09:32 AM (17 years ago)
Author:
Bruno Cornec
Message:

More controls at the compiler level
still working with the problems around variable arguments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/src/lib/mr_mem.c

    r1061 r1064  
    99 * Provided under the GPLv2
    1010 */
     11
     12#ifndef _GNU_SOURCE
     13#define _GNU_SOURCE
     14#endif
    1115
    1216#include <stdio.h>
     
    5256
    5357/* encapsulation function for asprintf */
    54 void mr_asprintf(char **strp, const char *fmt, va_list args) {
     58void mr_asprintf(char **strp, const char *fmt, ...) {
    5559
    5660    int res = 0;
     61    va_list args;
    5762
     63    va_start(args,fmt);
    5864    res = vasprintf(strp, fmt, args);
    5965    if (res == -1) {
    6066        mr_log_exit(-1,"Unable to alloc memory in mr_asprintf\nExiting...");
    6167    }
     68    va_end(args);
    6269}
    6370
Note: See TracChangeset for help on using the changeset viewer.