forked from auracaster/openocd
binarybuffer: str_to_buf(): rename buf_len as buf_bitsize
The name 'buf_len' is misleading, as it usually refers to the byte length of a buffer. Here we use it for the length in bits. Rename it as 'buf_bitsize'. While there, fix checkpatch error by changing the index type to 'unsigned int'. Change-Id: I78855ed79a346d996d9c0100d94d14c64a36b228 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8395 Tested-by: jenkins Reviewed-by: Jan Matyas <jan.matyas@codasip.com>
This commit is contained in:
@@ -198,10 +198,10 @@ void *buf_set_buf(const void *src, unsigned src_start,
|
||||
* number is detected between decimal, hexadecimal and octal.
|
||||
* @param str Input number, zero-terminated string
|
||||
* @param _buf Output buffer, allocated by the caller
|
||||
* @param buf_len Output buffer size in bits
|
||||
* @param buf_bitsize Output buffer size in bits
|
||||
* @returns Error on invalid or overflowing number
|
||||
*/
|
||||
int str_to_buf(const char *str, void *_buf, unsigned int buf_len);
|
||||
int str_to_buf(const char *str, void *_buf, unsigned int buf_bitsize);
|
||||
|
||||
char *buf_to_hex_str(const void *buf, unsigned size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user