]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib: fixed unused return value cid#108843
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 19 Apr 2015 19:41:12 +0000 (21:41 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sun, 19 Apr 2015 19:41:12 +0000 (21:41 +0200)
lib/layer/itercache.c

index 166708ec7010bc35344ee0f3b8b5716c37798e22..3abd8180302d53183ac5c5d2c89503531d8eeb28 100644 (file)
@@ -256,8 +256,9 @@ static int write_cache(knot_layer_t *ctx, knot_pkt_t *pkt)
        if (knot_wire_get_aa(pkt->wire)) {
                ret = write_cache_answer(pkt, txn, pool, timestamp);
        }
-
-       ret = write_cache_authority(pkt, txn, pool, timestamp);
+       if (ret == KNOT_EOK) {
+               ret = write_cache_authority(pkt, txn, pool, timestamp);
+       }
 
        /* Cache full, do what we must. */
        if (ret == KNOT_ESPACE) {