]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dict-memcached: Response status may not be included in enum memcached_response
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 5 Oct 2017 10:39:49 +0000 (13:39 +0300)
committerTimo Sirainen <tss@dovecot.fi>
Thu, 5 Oct 2017 11:31:38 +0000 (14:31 +0300)
This helps at least static analyzers figure out that other statuses are
possible, although unexpected.

src/lib-dict/dict-memcached.c

index 7775b983fef5c91f4b8c4a94b6513ddd6796ff4f..fed3a8eab0d34160b4f4e562f2a27612bae1f91e 100644 (file)
@@ -28,7 +28,7 @@ enum memcached_response {
        MEMCACHED_RESPONSE_NOTFOUND     = 0x0001,
        MEMCACHED_RESPONSE_INTERNALERROR= 0x0084,
        MEMCACHED_RESPONSE_BUSY         = 0x0085,
-       MEMCACHED_RESPONSE_TEMPFAILURE  = 0x0086
+       MEMCACHED_RESPONSE_TEMPFAILURE  = 0x0086,
 };
 
 struct memcached_connection {
@@ -39,7 +39,7 @@ struct memcached_connection {
        struct {
                const unsigned char *value;
                size_t value_len;
-               enum memcached_response status;
+               uint16_t status; /* enum memcached_response */
                bool reply_received;
        } reply;
 };