Remove possible newline not the last character of the cellname.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@408 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -142,7 +142,9 @@ k_afsklog_all_local_cells (char *krealm)
|
|||||||
return KSUCCESS;
|
return KSUCCESS;
|
||||||
err = KSUCCESS;
|
err = KSUCCESS;
|
||||||
while(fgets(cell, sizeof(cell), f) && err == KSUCCESS) {
|
while(fgets(cell, sizeof(cell), f) && err == KSUCCESS) {
|
||||||
cell[strlen(cell) - 1] = '\0';
|
char *nl = strchr(cell, '\n');
|
||||||
|
if (nl != 0)
|
||||||
|
*nl = 0;
|
||||||
err = k_afsklog (cell, krealm);
|
err = k_afsklog (cell, krealm);
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Reference in New Issue
Block a user