From: Florian Forster Date: Sat, 8 Jan 2011 08:36:08 +0000 (+0100) Subject: libcollectdclient: Remove the "nonnull" attribute. X-Git-Tag: collectd-5.0.0~19 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a4af603d0dc077e3812399665667e63a11ceac48;p=collectd.git libcollectdclient: Remove the "nonnull" attribute. Some old versions of GCC don't know it and throw a warning. --- diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 9ee02c9f..3eb0d055 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -164,12 +164,14 @@ static int lcc_set_errno (lcc_connection_t *c, int err) /* {{{ */ return (0); } /* }}} int lcc_set_errno */ -__attribute__((nonnull (1, 2))) static char *lcc_strescape (char *dest, const char *src, size_t dest_size) /* {{{ */ { size_t dest_pos; size_t src_pos; + if ((dest == NULL) || (src == NULL)) + return (NULL); + dest_pos = 0; src_pos = 0;