From bce1056f959b647a858591035848957dc645fcfb Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 24 Sep 2018 07:45:49 +0000 Subject: * 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 --- test/lock.c | 12 +++++++----- 1 file 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, - "\n" - "" - "%s\n", - activelock(scope, depth, owner, timeout, token_href)); + + ne_snprintf(buf, sizeof buf, + "\n" + "" + "%s\n", + activelock(scope, depth, owner, timeout, token_href)); + return buf; } -- cgit v1.2.1