1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

debug: Rename variable for consistency

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Martin Schwenke 2021-10-06 23:02:10 +11:00 committed by Volker Lendecke
parent 24dc8c5d2b
commit 8cdd20c70a

View File

@ -430,7 +430,7 @@ static void debug_ringbuf_reload(bool enabled, bool previously_enabled,
static void _debug_ringbuf_log(int msg_level, static void _debug_ringbuf_log(int msg_level,
const char *msg, const char *msg,
size_t msglen) size_t msg_len)
{ {
size_t allowed_size; size_t allowed_size;
@ -441,20 +441,20 @@ static void _debug_ringbuf_log(int msg_level,
/* Ensure the buffer is always \0 terminated */ /* Ensure the buffer is always \0 terminated */
allowed_size = debug_ringbuf_size - 1; allowed_size = debug_ringbuf_size - 1;
if (msglen > allowed_size) { if (msg_len > allowed_size) {
return; return;
} }
if ((debug_ringbuf_ofs + msglen) < debug_ringbuf_ofs) { if ((debug_ringbuf_ofs + msg_len) < debug_ringbuf_ofs) {
return; return;
} }
if ((debug_ringbuf_ofs + msglen) > allowed_size) { if ((debug_ringbuf_ofs + msg_len) > allowed_size) {
debug_ringbuf_ofs = 0; debug_ringbuf_ofs = 0;
} }
memcpy(debug_ringbuf + debug_ringbuf_ofs, msg, msglen); memcpy(debug_ringbuf + debug_ringbuf_ofs, msg, msg_len);
debug_ringbuf_ofs += msglen; debug_ringbuf_ofs += msg_len;
} }
static void debug_ringbuf_log(int msg_level, static void debug_ringbuf_log(int msg_level,