more strcspn
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11513 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -82,8 +82,7 @@ get_cell_and_realm (krb5_context context,
|
||||
krb5_set_error_string (context, "no cell in %s", AFS_SERVERTHISCELL);
|
||||
return EINVAL;
|
||||
}
|
||||
if (buf[strlen(buf) - 1] == '\n')
|
||||
buf[strlen(buf) - 1] = '\0';
|
||||
buf[strcspn(buf, "\n")] = '\0';
|
||||
fclose(f);
|
||||
|
||||
d->cell = strdup (buf);
|
||||
@@ -100,8 +99,7 @@ get_cell_and_realm (krb5_context context,
|
||||
AFS_SERVERMAGICKRBCONF);
|
||||
return EINVAL;
|
||||
}
|
||||
if (buf[strlen(buf)-1] == '\n')
|
||||
buf[strlen(buf)-1] = '\0';
|
||||
buf[strcspn(buf, "\n")] = '\0';
|
||||
fclose(f);
|
||||
}
|
||||
/* uppercase */
|
||||
|
Reference in New Issue
Block a user