diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-01-22 14:45:00 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2024-02-02 11:50:03 +0000 |
commit | 39b9345234aacfcf5dbdf4ec5afc14bf0c6d9d2e (patch) | |
tree | 07c3b3e90486c0f89447e35128932de8371981d9 /ssl | |
parent | 613917ea0c5074700990851cb98b07f38c5b82b7 (diff) |
JSON_ENC: Minor tweaks
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22037)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/quic/json_enc.c | 8 | ||||
-rw-r--r-- | ssl/quic/qlog.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ssl/quic/json_enc.c b/ssl/quic/json_enc.c index f2c6f444e6..e5cf50066f 100644 --- a/ssl/quic/json_enc.c +++ b/ssl/quic/json_enc.c @@ -37,7 +37,7 @@ static void wbuf_cleanup(struct json_write_buf *wbuf) wbuf->alloc = 0; } -static void wbuf_set_bio(struct json_write_buf *wbuf, BIO *bio) +static void wbuf_set0_bio(struct json_write_buf *wbuf, BIO *bio) { wbuf->bio = bio; } @@ -238,7 +238,7 @@ int ossl_json_init(OSSL_JSON_ENC *json, BIO *bio, uint32_t flags) return 0; json->state = STATE_PRE_COMMA; - return ossl_json_reset(json); + return 1; } void ossl_json_cleanup(OSSL_JSON_ENC *json) @@ -273,9 +273,9 @@ int ossl_json_flush(OSSL_JSON_ENC *json) return wbuf_flush(&json->wbuf); } -int ossl_json_set_sink(OSSL_JSON_ENC *json, BIO *bio) +int ossl_json_set0_sink(OSSL_JSON_ENC *json, BIO *bio) { - wbuf_set_bio(&json->wbuf, bio); + wbuf_set0_bio(&json->wbuf, bio); return 1; } diff --git a/ssl/quic/qlog.c b/ssl/quic/qlog.c index 6cf89e3554..82da15f5d1 100644 --- a/ssl/quic/qlog.c +++ b/ssl/quic/qlog.c @@ -174,7 +174,7 @@ int ossl_qlog_set_sink_bio(QLOG *qlog, BIO *bio) ossl_qlog_flush(qlog); /* best effort */ BIO_free_all(qlog->bio); qlog->bio = bio; - ossl_json_set_sink(&qlog->json, bio); + ossl_json_set0_sink(&qlog->json, bio); return 1; } |