]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/*: improve some comments
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 24 Sep 2019 07:41:13 +0000 (09:41 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 10 Oct 2019 12:23:59 +0000 (14:23 +0200)
lib/cache/api.c
lib/layer.h
lib/utils.h

index ece97b96d5f2f1c5e6d030186a76dda17bb4d394..88feb0ee7d35e9732fb5cb09cfd5405bee329bf0 100644 (file)
@@ -568,7 +568,7 @@ static ssize_t stash_rrset(struct kr_cache *cache, const struct kr_query *qry,
                key = key_exact_type(k, rr->type);
        }
 
-       /* Compute materialized sizes of the new data. */
+       /* Compute in-cache size for the new data. */
        const knot_rdataset_t *rds_sigs = rr_sigs ? &rr_sigs->rrs : NULL;
        const int rr_ssize = rdataset_dematerialize_size(&rr->rrs);
        assert(rr_ssize == to_even(rr_ssize));
index 7518ea7cc13cee14e7dcbac605052ad6b28ebfa4..5fbd9df2f476c6922adfabce8220e01631b5c7bc 100644 (file)
@@ -82,7 +82,7 @@ struct kr_layer_api {
        /** Paired to begin, called both on successes and failures. */
        int (*finish)(kr_layer_t *ctx);
 
-       /** Processing an answer from upstream or the answer to the request.
+       /** Process an answer from upstream or from cache.
         * Lua API: call is omitted iff (state & KR_STATE_FAIL). */
        int (*consume)(kr_layer_t *ctx, knot_pkt_t *pkt);
 
index 61127ce0bb5c0e529f4a8a8518d4f0adba94f395..f806c8ff8105cd96deb53a3e7717e694ba78d71a 100644 (file)
@@ -230,7 +230,7 @@ static inline uint64_t kr_rand_bytes(unsigned int size)
        kr_rnd_buffered(data, size);
        /* I would have liked to dump the random data into a size_t directly,
         * but that would work well only on little-endian machines,
-        * so intsead I hope that the compiler will optimize this out.
+        * so instead I hope that the compiler will optimize this out.
         * (Tested via reading assembly from usual gcc -O2 setup.)
         * Alternatively we could waste more rnd bytes, but that seemed worse. */
        result = 0;