summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2017-04-14 15:11:32 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2017-04-14 15:11:32 +0000
commitcb86cf1d0a8b0ff425f19dd2f57b623b9b52934b (patch)
treea9e2d50d2934ca8d21e8a3b8a9cb529578f28cd2
parent39a138bc07c10a0f4c5b2355ab9bb42d26668572 (diff)
Avoid some false positives with cppcheck. No binary change.
OK jsg@
-rw-r--r--sys/dev/softraid.c5
-rw-r--r--sys/kern/kern_sig.c6
-rw-r--r--sys/net/if.c5
-rw-r--r--sys/net/if_spppsubr.c4
4 files changed, 11 insertions, 9 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a8365243b18..4135294d909 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.379 2017/03/27 17:42:19 deraadt Exp $ */
+/* $OpenBSD: softraid.c,v 1.380 2017/04/14 15:11:31 bluhm Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -5058,7 +5058,8 @@ sr_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size, int op, voi
my->srd = sc->sc_targets[sd->sc_link->target];
DNPRINTF(SR_D_MISC, "sr_hibernate_io: discipline is %s\n",
my->srd->sd_name);
- if (strncmp(my->srd->sd_name, "CRYPTO", 10))
+ if (strncmp(my->srd->sd_name, "CRYPTO",
+ sizeof(my->srd->sd_name)))
return (ENOTSUP);
/* Find the underlying device */
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index fd64f0d4ae8..de0e1cb5a0f 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.209 2017/04/13 03:52:25 guenther Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.210 2017/04/14 15:11:31 bluhm Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -646,7 +646,7 @@ killpg1(struct proc *cp, int signum, int pgid, int all)
struct pgrp *pgrp;
int nfound = 0;
- if (all)
+ if (all) {
/*
* broadcast
*/
@@ -659,7 +659,7 @@ killpg1(struct proc *cp, int signum, int pgid, int all)
if (signum)
prsignal(pr, signum);
}
- else {
+ } else {
if (pgid == 0)
/*
* zero pgid means send to my process group.
diff --git a/sys/net/if.c b/sys/net/if.c
index 3004adcae68..3e95ef495dc 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.492 2017/03/22 12:45:22 mikeb Exp $ */
+/* $OpenBSD: if.c,v 1.493 2017/04/14 15:11:31 bluhm Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1368,7 +1368,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr, u_int rdomain)
TAILQ_FOREACH(ifp, &ifnet, if_list) {
if (ifp->if_rdomain != rdomain)
continue;
- if (ifp->if_flags & IFF_POINTOPOINT)
+ if (ifp->if_flags & IFF_POINTOPOINT) {
TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) {
if (ifa->ifa_addr->sa_family !=
addr->sa_family || ifa->ifa_dstaddr == NULL)
@@ -1376,6 +1376,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr, u_int rdomain)
if (equal(addr, ifa->ifa_dstaddr))
return (ifa);
}
+ }
}
return (NULL);
}
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index c71eaf81fdd..bc9e30fbd41 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.162 2017/01/24 10:08:30 krw Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.163 2017/04/14 15:11:31 bluhm Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -3100,7 +3100,7 @@ sppp_ipv6cp_scr(struct sppp *sp)
if (sp->ipv6cp.opts & (1 << IPV6CP_OPT_COMPRESSION)) {
opt[i++] = IPV6CP_OPT_COMPRESSION;
opt[i++] = 4;
-p opt[i++] = 0; /* TBD */
+ opt[i++] = 0; /* TBD */
opt[i++] = 0; /* TBD */
/* variable length data may follow */
}