mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[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: Egry Gabor <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Roman Zippel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c196eff306
commit
964267e627
1 changed files with 6 additions and 1 deletions
|
|
@ -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 @@ next:
|
|||
--len;
|
||||
}
|
||||
|
||||
if (multiline)
|
||||
if (multiline && eol)
|
||||
bfp -= 3;
|
||||
|
||||
*bfp++ = '"';
|
||||
|
|
|
|||
Loading…
Reference in a new issue