projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe89881
)
libcollectdclient: Remove the "nonnull" attribute.
author
Florian Forster
<octo@huhu.verplant.org>
Sat, 8 Jan 2011 08:36:08 +0000
(09:36 +0100)
committer
Florian Forster
<octo@huhu.verplant.org>
Sat, 8 Jan 2011 08:36:08 +0000
(09:36 +0100)
Some old versions of GCC don't know it and throw a warning.
src/libcollectdclient/client.c
patch
|
blob
|
history
diff --git
a/src/libcollectdclient/client.c
b/src/libcollectdclient/client.c
index
9ee02c9
..
3eb0d05
100644
(file)
--- 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;