diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2018-09-24 07:45:49 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2018-09-24 07:45:49 +0000 |
commit | bce1056f959b647a858591035848957dc645fcfb (patch) | |
tree | 93e1af3f11d5db6e7aa4f9e17395c69a19d13f11 | |
parent | d2ffb2b7ba95a51b3cd903b83788cab8f6d191bb (diff) | |
download | neon-bce1056f959b647a858591035848957dc645fcfb.tar.gz |
* test/lock.c (lock_response): Use snprintf, avoid gcc 8 warning.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1998 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r-- | test/lock.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/lock.c b/test/lock.c index 1c2f081..78f1d63 100644 --- a/test/lock.c +++ b/test/lock.c @@ -73,11 +73,13 @@ static char *lock_response(enum ne_lock_scope scope, const char *token_href) { static char buf[BUFSIZ]; - sprintf(buf, - "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" - "<D:prop xmlns:D=\"DAV:\">" - "<D:lockdiscovery>%s</D:lockdiscovery></D:prop>\n", - activelock(scope, depth, owner, timeout, token_href)); + + ne_snprintf(buf, sizeof buf, + "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<D:prop xmlns:D=\"DAV:\">" + "<D:lockdiscovery>%s</D:lockdiscovery></D:prop>\n", + activelock(scope, depth, owner, timeout, token_href)); + return buf; } |