lkml.org 
[lkml]   [2023]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] seq_buf: fix a misleading comment
Date
The comment for seq_buf_has_overflowed() says that an overflow condition is
marked by len == size, but that's not what the code is testing. Make the
comment match reality.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
include/linux/seq_buf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h
index 515d7fcb9634..026302765494 100644
--- a/include/linux/seq_buf.h
+++ b/include/linux/seq_buf.h
@@ -39,7 +39,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size)

/*
* seq_buf have a buffer that might overflow. When this happens
- * the len and size are set to be equal.
+ * len is set to be greater than size.
*/
static inline bool
seq_buf_has_overflowed(struct seq_buf *s)
--
2.41.0
\
 
 \ /
  Last update: 2023-10-20 22:39    [W:2.050 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site