From f218af073545480016048ba8f567b757b6388cea Mon Sep 17 00:00:00 2001 From: "roberto@mrspuur" Date: Thu, 8 Sep 2011 19:45:46 +0200 Subject: [PATCH] clang fixes --- cache.c | 2 +- plugins/python/uwsgi_pymodule.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cache.c b/cache.c index 4b2be636..5872556f 100644 --- a/cache.c +++ b/cache.c @@ -516,7 +516,7 @@ int uwsgi_cache_set(char *key, uint16_t keylen, char *val, uint64_t vallen, uint uci->prev = last_index; } } - else if (flags && UWSGI_CACHE_FLAG_UPDATE) { + else if (flags & UWSGI_CACHE_FLAG_UPDATE) { uci = &uwsgi.cache_items[index] ; if (expires) { expires += time(NULL); diff --git a/plugins/python/uwsgi_pymodule.c b/plugins/python/uwsgi_pymodule.c index 8698c219..2352305f 100644 --- a/plugins/python/uwsgi_pymodule.c +++ b/plugins/python/uwsgi_pymodule.c @@ -3090,6 +3090,7 @@ PyObject *py_uwsgi_cache_get(PyObject * self, PyObject * args) { uwsgi_simple_message_string(remote, 111, 0, key, keylen, buffer, &valsize16, uwsgi.shared->options[UWSGI_OPTION_SOCKET_TIMEOUT]); if (valsize16 > 0) { value = buffer; + valsize = valsize16; } } else if (uwsgi.cache_max_items) {