If there is no /etc/ld.so.conf, it is not a fatal error. Correct the return

value from the function so that the exit value to the shell is correct.
This commit is contained in:
agc 1999-04-08 13:27:38 +00:00
parent a17071efea
commit 92003e043a
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ldconfig.c,v 1.22 1998/12/15 22:49:42 pk Exp $ */
/* $NetBSD: ldconfig.c,v 1.23 1999/04/08 13:27:38 agc Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -166,8 +166,12 @@ do_conf ()
size_t len;
int rval = 0;
if ((conf = fopen(_PATH_LD_SO_CONF, "r")) == NULL)
return (-1);
if ((conf = fopen(_PATH_LD_SO_CONF, "r")) == NULL) {
if (!silent) {
warnx("can't open `%s'", _PATH_LD_SO_CONF);
}
return (0);
}
while ((line = fgetln(conf, &len)) != NULL) {
if (*line == '#' || *line == '\n')
@ -197,6 +201,8 @@ do_conf ()
}
}
(void) fclose(conf);
return (rval);
}