This patch gets rid of the below message while performing a code analysis with cppcheck.
[sheepfs/http.c:534] -> [sheepfs/http.c:537]: (performance) Variable 'ret' is reassigned a value before the old one has been used. Signed-off-by: Ruoyu <lian...@ucweb.com> --- sheepfs/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sheepfs/http.c b/sheepfs/http.c index 881b1cb..a750684 100644 --- a/sheepfs/http.c +++ b/sheepfs/http.c @@ -531,7 +531,7 @@ int http_object_write(const char *path, const char *buf, size_t size, off_t ignore) { char entry[PATH_MAX], url[PATH_MAX]; - int ret = -EINVAL; + int ret; /* don't need '\n' at the end of 'buf' */ ret = generate_url(buf, size - 1, url, PATH_MAX); -- 1.8.3.2 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog