Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 964267e6 authored by Egry Gabor's avatar Egry Gabor Committed by Linus Torvalds
Browse files

[PATCH] kconfig: kxgettext: EOL fix



The end of line character doesn't exist on end of help in all case, check it
first.

Signed-off-by: default avatarEgry Gabor <gaboregry@t-online.hu>
Cc: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c196eff3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -14,6 +14,11 @@ static char *escape(const char* text, char *bf, int len)
{
	char *bfp = bf;
	int multiline = strchr(text, '\n') != NULL;
	int eol = 0;
	int textlen = strlen(text);

	if ((textlen > 0) && (text[textlen-1] == '\n'))
		eol = 1;

	*bfp++ = '"';
	--len;
@@ -43,7 +48,7 @@ static char *escape(const char* text, char *bf, int len)
		--len;
	}

	if (multiline)
	if (multiline && eol)
		bfp -= 3;

	*bfp++ = '"';