summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/debug.c4
-rw-r--r--src/reverse_proxy.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/common/debug.c b/common/debug.c
index 6212e71..3492eaa 100644
--- a/common/debug.c
+++ b/common/debug.c
@@ -60,7 +60,7 @@ static void debug_print_line(const char *func, const char *file, int line, const
60 strftime(str_time, 254, "%H:%M:%S", localtime (&the_time)); 60 strftime(str_time, 254, "%H:%M:%S", localtime (&the_time));
61 61
62 /* generate header text */ 62 /* generate header text */
63 (void)asprintf(&header, "%s %s:%d %s()", str_time, file, line, func); 63 if(asprintf(&header, "%s %s:%d %s()", str_time, file, line, func)<0){}
64 free (str_time); 64 free (str_time);
65 65
66 /* trim ending newlines */ 66 /* trim ending newlines */
@@ -86,7 +86,7 @@ void debug_info_real(const char *func, const char *file, int line, const char *f
86 86
87 /* run the real fprintf */ 87 /* run the real fprintf */
88 va_start(args, format); 88 va_start(args, format);
89 (void)vasprintf(&buffer, format, args); 89 if(vasprintf(&buffer, format, args)<0){}
90 va_end(args); 90 va_end(args);
91 91
92 debug_print_line(func, file, line, buffer); 92 debug_print_line(func, file, line, buffer);
diff --git a/src/reverse_proxy.c b/src/reverse_proxy.c
index 3ab1031..bca0a13 100644
--- a/src/reverse_proxy.c
+++ b/src/reverse_proxy.c
@@ -25,6 +25,9 @@
25#endif 25#endif
26#include <string.h> 26#include <string.h>
27#include <stdlib.h> 27#include <stdlib.h>
28#define _GNU_SOURCE 1
29#define __USE_GNU 1
30#include <stdio.h>
28#include <errno.h> 31#include <errno.h>
29 32
30#include <plist/plist.h> 33#include <plist/plist.h>
@@ -91,7 +94,7 @@ static void _reverse_proxy_log(reverse_proxy_client_t client, const char* format
91 va_list args; 94 va_list args;
92 va_start(args, format); 95 va_start(args, format);
93 char* buffer = NULL; 96 char* buffer = NULL;
94 (void)vasprintf(&buffer, format, args); 97 if(vasprintf(&buffer, format, args)<0){}
95 va_end(args); 98 va_end(args);
96 client->log_cb(client, buffer, client->log_cb_user_data); 99 client->log_cb(client, buffer, client->log_cb_user_data);
97 free(buffer); 100 free(buffer);
@@ -113,7 +116,7 @@ static void _reverse_proxy_status(reverse_proxy_client_t client, int status, con
113 va_list args; 116 va_list args;
114 va_start(args, format); 117 va_start(args, format);
115 char* buffer = NULL; 118 char* buffer = NULL;
116 (void)vasprintf(&buffer, format, args); 119 if(vasprintf(&buffer, format, args)<0){}
117 va_end(args); 120 va_end(args);
118 client->status_cb(client, status, buffer, client->status_cb_user_data); 121 client->status_cb(client, status, buffer, client->status_cb_user_data);
119 free(buffer); 122 free(buffer);