Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/dist/libopts Make this build again: include...
details: https://anonhg.NetBSD.org/src/rev/d685f1e3a500
branches: trunk
changeset: 769767:d685f1e3a500
user: he <he%NetBSD.org@localhost>
date: Thu Sep 22 16:05:11 2011 +0000
description:
Make this build again: include <err.h> when needed, and don't
shadow err() with a local variable called err...
diffstat:
external/bsd/ntp/dist/libopts/compat/pathfind.c | 4 +++-
external/bsd/ntp/dist/libopts/configfile.c | 16 ++++++++--------
2 files changed, 11 insertions(+), 9 deletions(-)
diffs (71 lines):
diff -r 790a913b65d9 -r d685f1e3a500 external/bsd/ntp/dist/libopts/compat/pathfind.c
--- a/external/bsd/ntp/dist/libopts/compat/pathfind.c Thu Sep 22 12:49:57 2011 +0000
+++ b/external/bsd/ntp/dist/libopts/compat/pathfind.c Thu Sep 22 16:05:11 2011 +0000
@@ -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
diff -r 790a913b65d9 -r d685f1e3a500 external/bsd/ntp/dist/libopts/configfile.c
--- a/external/bsd/ntp/dist/libopts/configfile.c Thu Sep 22 12:49:57 2011 +0000
+++ b/external/bsd/ntp/dist/libopts/configfile.c Thu Sep 22 16:05:11 2011 +0000
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index