Changeset 1074 in MondoRescue for trunk/mondo/src/lib/mr_mem.c
- Timestamp:
- Jan 25, 2007, 4:18:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/lib/mr_mem.c
r929 r1074 10 10 */ 11 11 12 #ifndef _GNU_SOURCE 13 #define _GNU_SOURCE 14 #endif 15 12 16 #include <stdio.h> 13 17 #include <stdlib.h> 14 #include <stdarg.h>15 18 16 19 #include "mr_err.h" … … 52 55 } 53 56 54 55 /* encapsulation function for vasprintf */56 void mr_vasprintf(char **strp, const char *fmt, va_list ap) {57 58 int res = 0;59 60 res = vasprintf(strp, fmt, ap);61 if (res == -1) {62 mr_log_exit(-1,"Unable to alloc memory in mr_vasprintf\nExiting...");63 }64 }65 66 57 /* encapsulation function for asprintf */ 67 58 void mr_asprintf(char **strp, const char *fmt, ...) { … … 70 61 va_list args; 71 62 72 va_start(args, 73 res = asprintf(strp, fmt, args);63 va_start(args,fmt); 64 res = vasprintf(strp, fmt, args); 74 65 if (res == -1) { 75 66 mr_log_exit(-1,"Unable to alloc memory in mr_asprintf\nExiting...");
Note:
See TracChangeset
for help on using the changeset viewer.