summaryrefslogtreecommitdiffstats
path: root/contrib/bsnmp
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2006-01-10 11:47:56 +0000
committerharti <harti@FreeBSD.org>2006-01-10 11:47:56 +0000
commit55c3d04c8a7702e29c1cc74d71986420fc783def (patch)
tree030ec9542a67f88abdde07d33bd8f7f243fecfef /contrib/bsnmp
parent53ef42030b2414ec7b6359cdcb9db63804c037e4 (diff)
parent2842bec986d4ffbfd2cceef7e5c7c114416bd148 (diff)
downloadFreeBSD-src-55c3d04c8a7702e29c1cc74d71986420fc783def.zip
FreeBSD-src-55c3d04c8a7702e29c1cc74d71986420fc783def.tar.gz
This commit was generated by cvs2svn to compensate for changes in r154178,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bsnmp')
-rw-r--r--contrib/bsnmp/snmpd/config.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/bsnmp/snmpd/config.c b/contrib/bsnmp/snmpd/config.c
index ce3a469..0701c41 100644
--- a/contrib/bsnmp/snmpd/config.c
+++ b/contrib/bsnmp/snmpd/config.c
@@ -206,17 +206,18 @@ input_open_file(const char *fname, int sysdir)
struct input *input;
FILE *fp;
char path[PATH_MAX + 1];
- char *col;
+ const char *col;
const char *ptr;
if (sysdir) {
ptr = syspath;
fp = NULL;
while (*ptr != '\0') {
- if ((col = strchr(ptr, ':')) == NULL)
+ if ((col = strchr(ptr, ':')) == NULL) {
snprintf(path, sizeof(path), "%s/%s",
ptr, fname);
- else if (col == ptr)
+ col = ptr + strlen(ptr) - 1;
+ } else if (col == ptr)
snprintf(path, sizeof(path), "./%s", fname);
else
snprintf(path, sizeof(path), "%.*s/%s",
OpenPOWER on IntegriCloud