/[sudobot]/trunk/lib/common/utils/utils.c
ViewVC logotype

Contents of /trunk/lib/common/utils/utils.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 575 - (show annotations)
Mon Jul 29 17:59:26 2024 UTC (8 months ago) by rakinar2
File MIME type: text/x-c
File size: 371 byte(s)
chore: add trunk
1 #include <errno.h>
2 #include <string.h>
3 #include <stdarg.h>
4 #include <stdlib.h>
5 #include "utils.h"
6
7 const char *get_last_error()
8 {
9 return strerror(errno);
10 }
11
12 void free_varg(void *ptr1, ...)
13 {
14 va_list args;
15 va_start(args, ptr1);
16 free(ptr1);
17 void *arg;
18
19 while ((arg = va_arg(args, void *)) != FREE_VARG_ENDARG)
20 free(arg);
21
22 va_end(args);
23 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26