Commit 12d2d281 authored by Rob Percival's avatar Rob Percival Committed by Rich Salz
Browse files

Makes CTLOG_STORE_get0_log_by_id return const CTLOG*

parent 98af7310
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -334,14 +334,14 @@ EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log)
 * Given a log ID, finds the matching log.
 * Returns NULL if no match found.
 */
CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
                                        const uint8_t *log_id,
                                        size_t log_id_len)
{
    int i;

    for (i = 0; i < sk_CTLOG_num(store->logs); ++i) {
        CTLOG *log = sk_CTLOG_value(store->logs, i);
        const CTLOG *log = sk_CTLOG_value(store->logs, i);
        if (memcmp(log->log_id, log_id, log_id_len) == 0)
            return log;
    }
+3 −3
Original line number Diff line number Diff line
@@ -539,7 +539,7 @@ void CTLOG_STORE_free(CTLOG_STORE *store);
 * Finds a CT log in the store based on its log ID.
 * Returns the CT log, or NULL if no match is found.
 */
CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
                                        const uint8_t *log_id,
                                        size_t log_id_len);