Module Name: src
Committed By: he
Date: Thu Sep 22 16:05:11 UTC 2011
Modified Files:
src/external/bsd/ntp/dist/libopts: configfile.c
src/external/bsd/ntp/dist/libopts/compat: pathfind.c
Log Message:
Make this build again: include <err.h> when needed, and don't
shadow err() with a local variable called err...
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/libopts/configfile.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/libopts/compat/pathfind.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/libopts/configfile.c
diff -u src/external/bsd/ntp/dist/libopts/configfile.c:1.2 src/external/bsd/ntp/dist/libopts/configfile.c:1.3
--- src/external/bsd/ntp/dist/libopts/configfile.c:1.2 Sat Dec 4 23:08:34 2010
+++ src/external/bsd/ntp/dist/libopts/configfile.c Thu Sep 22 16:05:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: configfile.c,v 1.2 2010/12/04 23:08:34 christos Exp $ */
+/* $NetBSD: configfile.c,v 1.3 2011/09/22 16:05:11 he Exp $ */
/*
* Id: f1650b45a91ec95af830ff76041cc4f0048e60f0
@@ -131,9 +131,9 @@
pRes = optionLoadNested(pzText, pzFile, strlen(pzFile));
if (pRes == NULL) {
- int err = errno;
+ int e = errno;
text_munmap( &cfgfile );
- errno = err;
+ errno = e;
} else
text_munmap( &cfgfile );
@@ -376,7 +376,7 @@
{
tArgList* pAL;
tOptionValue* pRes = NULL;
- int err = EINVAL;
+ int e = EINVAL;
if ((pOVList == NULL) || (pOVList->valType != OPARG_TYPE_HIERARCHY)) {
errno = EINVAL;
@@ -391,18 +391,18 @@
tOptionValue* pNV = *(papNV++);
if (pNV == pOldOV) {
if (ct == 0) {
- err = ENOENT;
+ e = ENOENT;
} else {
- err = 0;
+ e = 0;
pRes = (tOptionValue*)*papNV;
}
break;
}
}
}
- if (err != 0)
- errno = err;
+ if (e != 0)
+ errno = e;
return pRes;
}
Index: src/external/bsd/ntp/dist/libopts/compat/pathfind.c
diff -u src/external/bsd/ntp/dist/libopts/compat/pathfind.c:1.3 src/external/bsd/ntp/dist/libopts/compat/pathfind.c:1.4
--- src/external/bsd/ntp/dist/libopts/compat/pathfind.c:1.3 Thu Sep 22 12:40:48 2011
+++ src/external/bsd/ntp/dist/libopts/compat/pathfind.c Thu Sep 22 16:05:11 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pathfind.c,v 1.3 2011/09/22 12:40:48 christos Exp $ */
+/* $NetBSD: pathfind.c,v 1.4 2011/09/22 16:05:11 he Exp $ */
/* -*- Mode: C -*- */
@@ -14,6 +14,8 @@
/* Code: */
+#include <err.h>
+
#include "compat.h"
#ifndef HAVE_PATHFIND