summaryrefslogtreecommitdiffstats
path: root/contrib/top/commands.c
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1997-12-22 19:39:20 +0000
committerjb <jb@FreeBSD.org>1997-12-22 19:39:20 +0000
commitb93ad9c7b624d7d08f61ce6d7c81e32bcb2132de (patch)
tree183c6c7a45c0773dfc5ecfc37f8ee52837517a35 /contrib/top/commands.c
parent6b0fed6a9633b43f829c8e00d3cb0d3f61480bcf (diff)
downloadFreeBSD-src-b93ad9c7b624d7d08f61ce6d7c81e32bcb2132de.zip
FreeBSD-src-b93ad9c7b624d7d08f61ce6d7c81e32bcb2132de.tar.gz
Reviewed by: William LeFebvre <wnl@groupsys.com>
Change errno -> error in local structure to avoid a clash with the thread-aware version of errno which is required for a thread-safe libc. Have discussed this with the author and he has agreed to this change. 8-)
Diffstat (limited to 'contrib/top/commands.c')
-rw-r--r--contrib/top/commands.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/top/commands.c b/contrib/top/commands.c
index a848231..8ea10a2 100644
--- a/contrib/top/commands.c
+++ b/contrib/top/commands.c
@@ -153,7 +153,7 @@ int *intp;
struct errs /* structure for a system-call error */
{
- int errno; /* value of errno (that is, the actual error) */
+ int error; /* value of errno (that is, the actual error) */
char *arg; /* argument that caused the error */
};
@@ -172,7 +172,7 @@ static char *err_listem =
else \
{ \
errs[errcnt].arg = (p); \
- errs[errcnt++].errno = (e); \
+ errs[errcnt++].error = (e); \
}
/*
@@ -212,7 +212,7 @@ char *err_string()
while (cnt < errcnt)
{
errp = &(errs[cnt++]);
- if (errp->errno != currerr)
+ if (errp->error != currerr)
{
if (currerr != -1)
{
@@ -222,7 +222,7 @@ char *err_string()
}
(void) strcat(string, "; "); /* we know there's more */
}
- currerr = errp->errno;
+ currerr = errp->error;
first = Yes;
}
if ((stringlen = str_addarg(string, stringlen, errp->arg, first)) ==0)
@@ -310,7 +310,7 @@ register struct errs *p1, *p2;
{
register int result;
- if ((result = p1->errno - p2->errno) == 0)
+ if ((result = p1->error - p2->error) == 0)
{
return(strcmp(p1->arg, p2->arg));
}
@@ -341,7 +341,7 @@ show_errors()
while (cnt++ < errcnt)
{
printf("%5s: %s\n", errp->arg,
- errp->errno == 0 ? "Not a number" : errmsg(errp->errno));
+ errp->error == 0 ? "Not a number" : errmsg(errp->error));
errp++;
}
}
OpenPOWER on IntegriCloud