Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/usr.bin/pkill Pull up following revision(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/3f0e58119f50
branches: netbsd-3
changeset: 577359:3f0e58119f50
user: riz <riz%NetBSD.org@localhost>
date: Sat Oct 15 16:34:04 2005 +0000
description:
Pull up following revision(s) (requested by kleink in ticket #890):
usr.bin/pkill/pkill.c: revision 1.14
Sprinkle const liberally
diffstat:
usr.bin/pkill/pkill.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (61 lines):
diff -r b2861a04ed93 -r 3f0e58119f50 usr.bin/pkill/pkill.c
--- a/usr.bin/pkill/pkill.c Sat Oct 15 16:33:46 2005 +0000
+++ b/usr.bin/pkill/pkill.c Sat Oct 15 16:34:04 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pkill.c,v 1.9.2.4 2005/10/15 16:33:46 riz Exp $ */
+/* $NetBSD: pkill.c,v 1.9.2.5 2005/10/15 16:34:04 riz Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: pkill.c,v 1.9.2.4 2005/10/15 16:33:46 riz Exp $");
+__RCSID("$NetBSD: pkill.c,v 1.9.2.5 2005/10/15 16:34:04 riz Exp $");
#endif /* !lint */
#include <sys/types.h>
@@ -109,18 +109,19 @@
int main(int, char **);
static void usage(void) __attribute__((__noreturn__));
-static int killact(struct kinfo_proc2 *);
-static int grepact(struct kinfo_proc2 *);
+static int killact(const struct kinfo_proc2 *);
+static int grepact(const struct kinfo_proc2 *);
static void makelist(struct listhead *, enum listtype, char *);
int
main(int argc, char **argv)
{
- char buf[_POSIX2_LINE_MAX], *mstr, **pargv, *p, *q;
+ char buf[_POSIX2_LINE_MAX], **pargv, *q;
int i, j, ch, bestidx, rv, criteria;
- int (*action)(struct kinfo_proc2 *);
- struct kinfo_proc2 *kp;
+ int (*action)(const struct kinfo_proc2 *);
+ const struct kinfo_proc2 *kp;
struct list *li;
+ const char *mstr, *p;
u_int32_t bestsec, bestusec;
regex_t reg;
regmatch_t regmatch;
@@ -429,7 +430,7 @@
}
static int
-killact(struct kinfo_proc2 *kp)
+killact(const struct kinfo_proc2 *kp)
{
if (kill(kp->p_pid, signum) == -1) {
@@ -450,7 +451,7 @@
}
static int
-grepact(struct kinfo_proc2 *kp)
+grepact(const struct kinfo_proc2 *kp)
{
char **argv;
Home |
Main Index |
Thread Index |
Old Index