diff options
author | Max Kellermann <max@musicpd.org> | 2018-01-24 12:52:43 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-06 19:07:02 +0200 |
commit | 60d5bf0240dea58419edb05198906349e81abbe8 (patch) | |
tree | 3811d24f1ec17257b14d7dd8759a6948ac676399 /src/storage | |
parent | 41cdc4e14b3d36d70039a7ac1578fe7c898a0bac (diff) |
util/StringFormat: new utility library
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/plugins/CurlStorage.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 85863cb07..c077b8bb2 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -35,6 +35,7 @@ #include "thread/Cond.hxx" #include "util/RuntimeError.hxx" #include "util/StringCompare.hxx" +#include "util/StringFormat.hxx" #include "util/TimeParser.hxx" #include "util/UriUtil.hxx" @@ -296,9 +297,7 @@ public: { request.SetOption(CURLOPT_CUSTOMREQUEST, "PROPFIND"); - char buffer[40]; - sprintf(buffer, "depth: %u", depth); - request_headers.Append(buffer); + request_headers.Append(StringFormat<40>("depth: %u", depth)); request.SetOption(CURLOPT_HTTPHEADER, request_headers.Get()); |