diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-06-07 15:37:44 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2007-06-07 15:37:44 +0000 |
commit | bd9578d2dc1bf4ed587e0158b8f3c0753fd18f29 (patch) | |
tree | bae7e17c280cc54e3f6403a9bcfaf8d336b793cd /src/conntrack/api.c | |
parent | 25e5b78e44726f8f7b79e41bf33193ef21e51a36 (diff) |
fix nfct_snprintf behaviour if the buffer passed is too small (similar to C99 convention)
Diffstat (limited to 'src/conntrack/api.c')
-rw-r--r-- | src/conntrack/api.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conntrack/api.c b/src/conntrack/api.c index 9f14188..2d90818 100644 --- a/src/conntrack/api.c +++ b/src/conntrack/api.c @@ -605,8 +605,9 @@ int nfct_catch(struct nfct_handle *h) * - NFCT_O_LAYER: include layer 3 information in the output, this is * *only* required by NFCT_O_DEFAULT. * - * On error, -1 is returned and errno is set appropiately. Otherwise, - * 0 is returned. + * This function returns the size of the information that _would_ have been + * written to the buffer, even if there was no room for it. Thus, the + * behaviour is similar to snprintf. */ int nfct_snprintf(char *buf, unsigned int size, |