only remove final \n if there's one
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1981 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -42,6 +42,7 @@ parse_list(FILE *f, unsigned *lineno, krb5_config_binding **parent)
|
||||
for (; fgets(buf, sizeof(buf), f) != NULL; ++*lineno) {
|
||||
char *p;
|
||||
|
||||
if (buf[strlen(buf) - 1] == '\n')
|
||||
buf[strlen(buf) - 1] = '\0';
|
||||
p = buf;
|
||||
while(isspace(*p))
|
||||
@@ -118,6 +119,7 @@ krb5_config_parse_file (const char *fname, krb5_config_section **res)
|
||||
for (lineno = 1; fgets(buf, sizeof(buf), f) != NULL; ++lineno) {
|
||||
char *p;
|
||||
|
||||
if(buf[strlen(buf) - 1] == '\n')
|
||||
buf[strlen(buf) - 1] = '\0';
|
||||
p = buf;
|
||||
while(isspace(*p))
|
||||
|
Reference in New Issue
Block a user