summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2018-09-24 07:45:49 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2018-09-24 07:45:49 +0000
commitbce1056f959b647a858591035848957dc645fcfb (patch)
tree93e1af3f11d5db6e7aa4f9e17395c69a19d13f11
parentd2ffb2b7ba95a51b3cd903b83788cab8f6d191bb (diff)
downloadneon-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.c12
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;
}