summaryrefslogtreecommitdiffstats
path: root/gettext-tools/src/read-desktop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/src/read-desktop.c')
-rw-r--r--gettext-tools/src/read-desktop.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gettext-tools/src/read-desktop.c b/gettext-tools/src/read-desktop.c
index 8f9243b..be574ce 100644
--- a/gettext-tools/src/read-desktop.c
+++ b/gettext-tools/src/read-desktop.c
@@ -271,16 +271,13 @@ desktop_lex (token_ty *tp)
break;
}
/* Skip until newline. */
- if (c != '\n')
+ while (c != '\n' && c != EOF)
{
- for (;;)
- {
- if (c == '\n' || c == EOF)
- break;
- if (!c_isspace (c))
- non_blank = true;
- c = phase2_getc ();
- }
+ c = phase2_getc ();
+ if (c == EOF)
+ break;
+ if (!c_isspace (c))
+ non_blank = true;
}
if (non_blank)
po_xerror (PO_SEVERITY_WARNING, NULL,