Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2024 | ||
3 | ** zappy | ||
4 | ** File description: | ||
5 | ** client.c | ||
6 | */ | ||
7 | |||
8 | #include "client.h" | ||
9 | #include <stdarg.h> | ||
10 | |||
11 | 49 | void handle_response(char **dest, const char *fmt, ...) | |
12 | { | ||
13 | 49 | va_list args; | |
14 | 49 | char *response = NULL; | |
15 | |||
16 | 49 | va_start(args, fmt); | |
17 | 49 | if (vasprintf(&response, fmt, args) != -1) { | |
18 | 49 | *dest = response; | |
19 | } | ||
20 | 49 | va_end(args); | |
21 | 49 | } | |
22 |