diff options
author | sijanec <anton@sijanec.eu> | 2021-04-07 23:15:16 +0200 |
---|---|---|
committer | sijanec <anton@sijanec.eu> | 2021-04-07 23:15:16 +0200 |
commit | a19e3705a228735eacadd713b28d49fe33bb726b (patch) | |
tree | 9c5fd6e62a24e7f893686b45da15ecda91b41a58 /src/lib.c | |
parent | fuck (diff) | |
download | sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.gz sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.bz2 sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.lz sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.xz sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.tar.zst sear.c-a19e3705a228735eacadd713b28d49fe33bb726b.zip |
Diffstat (limited to 'src/lib.c')
-rw-r--r-- | src/lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -84,6 +84,7 @@ void printNode (xmlNodePtr node, void * data) { #define gnu_code_start \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wpedantic\"") + _Pragma ("GCC diagnostic ignored \"-Wformat=\"") #define gnu_code_end \ _Pragma ("GCC diagnostic pop") /* this is the definition of the anonymous function - source: https://en.wikipedia.org/wiki/Anonymous_function#GCC */ @@ -94,6 +95,8 @@ void printNode (xmlNodePtr node, void * data) { &l_anonymous_functions_name; \ }) char * htmlspecialchars (const char * i) { /* remember to free the output */ + if (!i) + return NULL; size_t s = 128; char * o = malloc(s); size_t w = 0; |