[PATCH] strbuf_stripspace(): rename skip_comments arg to strip_comments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That makes its function much clearer and more consistent with the
context.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@xxxxxx>
---
 strbuf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/strbuf.c b/strbuf.c
index 1c57ac6574..49e8beaa4c 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -1118,10 +1118,10 @@ static size_t cleanup(char *line, size_t len)
  *
  * If last line does not have a newline at the end, one is added.
  *
- * Enable skip_comments to skip every line starting with comment
+ * Enable strip_comments to strip every line starting with a comment
  * character.
  */
-void strbuf_stripspace(struct strbuf *sb, int skip_comments)
+void strbuf_stripspace(struct strbuf *sb, int strip_comments)
 {
 	size_t empties = 0;
 	size_t i, j, len, newlen;
@@ -1134,7 +1134,7 @@ void strbuf_stripspace(struct strbuf *sb, int skip_comments)
 		eol = memchr(sb->buf + i, '\n', sb->len - i);
 		len = eol ? eol - (sb->buf + i) + 1 : sb->len - i;
 
-		if (skip_comments && len && sb->buf[i] == comment_line_char) {
+		if (strip_comments && len && sb->buf[i] == comment_line_char) {
 			newlen = 0;
 			continue;
 		}
-- 
2.40.0.152.g15d061e6df




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux