aboutsummaryrefslogtreecommitdiff
path: root/bin/kill/kill.c
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-01-28 19:04:14 +0000
committerNate Lawson <njl@FreeBSD.org>2004-01-28 19:04:14 +0000
commit205bc8633eccc2f6cda5850501dfae77bb9b4433 (patch)
treec8a6108140d2b3f04ff95f647557a7ec131cf213 /bin/kill/kill.c
parent1b13752a03eb84da8d75e4be30884afd4b53cf68 (diff)
downloadsrc-205bc8633eccc2f6cda5850501dfae77bb9b4433.tar.gz
src-205bc8633eccc2f6cda5850501dfae77bb9b4433.zip
Use sys_nsig instead of the static NSIG. DragonflyBSD kill.c:1.3
Obtained from: DragonflyBSD
Notes
Notes: svn path=/head/; revision=125156
Diffstat (limited to 'bin/kill/kill.c')
-rw-r--r--bin/kill/kill.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/kill/kill.c b/bin/kill/kill.c
index 120dc8797a9c..a1c8515a93e8 100644
--- a/bin/kill/kill.c
+++ b/bin/kill/kill.c
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
errx(1, "illegal signal number: %s", *argv);
if (numsig >= 128)
numsig -= 128;
- if (numsig <= 0 || numsig >= NSIG)
+ if (numsig <= 0 || numsig >= sys_nsig)
nosig(*argv);
printf("%s\n", sys_signame[numsig]);
exit(0);
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
numsig = strtol(*argv, &ep, 10);
if (!**argv || *ep)
errx(1, "illegal signal number: %s", *argv);
- if (numsig < 0 || numsig >= NSIG)
+ if (numsig < 0 || numsig >= sys_nsig)
nosig(*argv);
} else
nosig(*argv);
@@ -146,7 +146,7 @@ signame_to_signum(char *sig)
if (!strncasecmp(sig, "sig", (size_t)3))
sig += 3;
- for (n = 1; n < NSIG; n++) {
+ for (n = 1; n < sys_nsig; n++) {
if (!strcasecmp(sys_signame[n], sig))
return (n);
}
@@ -167,9 +167,9 @@ printsignals(FILE *fp)
{
int n;
- for (n = 1; n < NSIG; n++) {
+ for (n = 1; n < sys_nsig; n++) {
(void)fprintf(fp, "%s", sys_signame[n]);
- if (n == (NSIG / 2) || n == (NSIG - 1))
+ if (n == (sys_nsig / 2) || n == (sys_nsig - 1))
(void)fprintf(fp, "\n");
else
(void)fprintf(fp, " ");