summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorRay Lai <ray@cvs.openbsd.org>2007-05-17 04:57:32 +0000
committerRay Lai <ray@cvs.openbsd.org>2007-05-17 04:57:32 +0000
commitd26445481c749751c2a9496899239d9165bd4d19 (patch)
treeea8dc544f40da27aefe4d9765bb2212dbbe456a0 /lib/libc
parent9fe90bc1a9c442e878fa2a3f3d57051e01927847 (diff)
Don't save strlen results in an int. Remove a variable that's used
only once while here. From tbert. OK jaredy@.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/psignal.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libc/gen/psignal.c b/lib/libc/gen/psignal.c
index e1faa71586b..dfe62753b17 100644
--- a/lib/libc/gen/psignal.c
+++ b/lib/libc/gen/psignal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: psignal.c,v 1.8 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: psignal.c,v 1.9 2007/05/17 04:57:31 ray Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -46,16 +46,13 @@ psignal(unsigned int sig, const char *s)
{
static char buf[NL_TEXTMAX];
const char *c;
- int n;
struct iovec iov[4];
int niov = 0;
c = __strsignal(sig, buf);
if (s && *s) {
-
- n = strlen(s);
iov[0].iov_base = (void *)s;
- iov[0].iov_len = n;
+ iov[0].iov_len = strlen(s);
iov[1].iov_base = ": ";
iov[1].iov_len = 2;
niov = 2;