Skip to content

Commit 874581d

Browse files
shemmingertmonjalo
authored andcommitted
bitmap: change return type of free function
No existing code is checking the return value of rte_bitmap_free and other functions like rte_free do not return an int. Change it to just a stub void function. This was motivated by Coverity warnings about unchecked return value. Signed-off-by: Stephen Hemminger <[email protected]> Reviewed-by: Morten Brørup <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
1 parent 200ccb9 commit 874581d

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

doc/guides/rel_notes/release_25_11.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ API Changes
262262
The link type was previously hardcoded to the Ethernet link type in the API.
263263
This argument is added to ``rte_pcapng_add_interface``.
264264

265+
* bitmap: Changed the return type of ``rte_bitmap_free()`` to void
266+
for consistency with other free functions.
267+
265268

266269
ABI Changes
267270
-----------

lib/eal/include/rte_bitmap.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,20 +282,15 @@ rte_bitmap_init_with_all_set(uint32_t n_bits, uint8_t *mem, uint32_t mem_size)
282282
/**
283283
* Bitmap free
284284
*
285+
* This function does nothing in current implementation.
286+
*
285287
* @param bmp
286288
* Handle to bitmap instance
287-
* @return
288-
* 0 upon success, error code otherwise
289289
*/
290-
static inline int
290+
static inline void
291291
rte_bitmap_free(struct rte_bitmap *bmp)
292292
{
293-
/* Check input arguments */
294-
if (bmp == NULL) {
295-
return -1;
296-
}
297-
298-
return 0;
293+
RTE_SET_USED(bmp);
299294
}
300295

301296
/**

0 commit comments

Comments
 (0)