Total confusion of what the return values shall be from k_afslog_file

and k_afsklog_all_local_cells.

Changed it to not always return error!


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@686 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Björn Groenvall
1996-08-26 09:35:05 +00:00
parent 076e7d75f2
commit 2afaff02b7

View File

@@ -243,12 +243,10 @@ aix_setup(void)
/*
* Try to find the cells we should try to klog to. Look at
* /usr/vice/etc/TheseCells and /usr/vice/etc/ThisCell,
* in that order.
* Try to find the cells we should try to klog to in "file".
*/
static int
static
int
k_afslog_file(char *file, char *krealm)
{
FILE *f;
@@ -256,7 +254,7 @@ k_afslog_file(char *file, char *krealm)
int err = KSUCCESS;
f = fopen(file, "r");
if (f == NULL)
return -1;
return KSUCCESS; /* No config file is ok! */
while (fgets(cell, sizeof(cell), f) && err == KSUCCESS) {
char *nl = strchr(cell, '\n');
if (nl)
@@ -267,7 +265,8 @@ k_afslog_file(char *file, char *krealm)
return err;
}
static int
static
int
k_afsklog_all_local_cells(char *krealm)
{
int err = KFAILURE;
@@ -275,11 +274,11 @@ k_afsklog_all_local_cells (char *krealm)
if ((p = getenv("HOME"))) {
sprintf(home, "%s/.TheseCells", p);
err = err && k_afslog_file(home, krealm);
err = k_afslog_file(home, krealm);
}
k_afslog_file(_PATH_THESECELLS, krealm);
k_afslog_file(_PATH_THISCELL, krealm);
return err;
return KSUCCESS; /* For now. */
}
int