Skip to content

Commit

Permalink
csp_buffer: Remove csp_buffer_data_size
Browse files Browse the repository at this point in the history
This commit removes the mis-introduced function csp_buffer_data_size()
added by commit 4748f8e.

The buffer size is a compile-time constant, and we can use sizeof() or
`CSP_BUFFER_SIZE` to determine the size. Therefore, we don't need to
query it dynamically via csp_buffer_data_size().

Signed-off-by: Gaetan Perrot <[email protected]>
  • Loading branch information
moonlight83340 authored and yashi committed Apr 25, 2024
1 parent 48f5b42 commit 6e7f046
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion doc/api/csp_buffer_h.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ Interface Functions
.. autocfunction:: csp_buffer.h::csp_buffer_clone
.. autocfunction:: csp_buffer.h::csp_buffer_remaining
.. autocfunction:: csp_buffer.h::csp_buffer_init
.. autocfunction:: csp_buffer.h::csp_buffer_data_size
.. autocfunction:: csp_buffer.h::csp_buffer_refc_inc
6 changes: 0 additions & 6 deletions include/csp/csp_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ int csp_buffer_remaining(void);

void csp_buffer_init(void);

/**
*
* @return CSP buffer data size.
*/
size_t csp_buffer_data_size(void);

/**
* Increase reference counter of buffer.
* Use csp_buffer_free() to decrement
Expand Down

0 comments on commit 6e7f046

Please sign in to comment.