diff options
Diffstat (limited to 'hicn-light/src/hicn/core/msgbuf.h')
-rw-r--r-- | hicn-light/src/hicn/core/msgbuf.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hicn-light/src/hicn/core/msgbuf.h b/hicn-light/src/hicn/core/msgbuf.h index ef2b38c51..7a35929f4 100644 --- a/hicn-light/src/hicn/core/msgbuf.h +++ b/hicn-light/src/hicn/core/msgbuf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Cisco and/or its affiliates. + * Copyright (c) 2021-2023 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -111,8 +111,7 @@ static inline u32 msgbuf_get_name_hash(const msgbuf_t *msgbuf) { static inline u32 msgbuf_get_interest_lifetime(const msgbuf_t *msgbuf) { u32 lifetime; int rc = hicn_interest_get_lifetime(msgbuf_get_pkbuf(msgbuf), &lifetime); - assert(rc == HICN_LIB_ERROR_NONE); // XXX - _unused(rc); + if (rc != HICN_LIB_ERROR_NONE) return 0; return lifetime; } @@ -130,8 +129,7 @@ static inline bool msgbuf_set_interest_lifetime(msgbuf_t *msgbuf, static inline u32 msgbuf_get_data_expiry_time(const msgbuf_t *msgbuf) { u32 lifetime; int rc = hicn_data_get_expiry_time(msgbuf_get_pkbuf(msgbuf), &lifetime); - assert(rc == HICN_LIB_ERROR_NONE); // XXX - _unused(rc); + if (rc != HICN_LIB_ERROR_NONE) return 0; return lifetime; } |