-/* $OpenBSD: pfkey.c,v 1.29 2014/02/21 20:52:38 markus Exp $ */
+/* $OpenBSD: pfkey.c,v 1.30 2014/04/25 09:41:21 jsg Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
struct sadb_x_policy sa_pol;
struct sockaddr *ssrc, *sdst, *smask, *dmask, *speer;
struct iovec iov[IOV_CNT];
- int iov_cnt, sd = env->sc_pfkey;
+ int iov_cnt, sd;
u_int8_t *reply;
ssize_t rlen;
const char *errmsg = NULL;
if (!env || !data || !len)
return;
+ sd = env->sc_pfkey;
hdr = (struct sadb_msg *)data;
switch (hdr->sadb_msg_type) {
-/* $OpenBSD: mpii.c,v 1.92 2014/04/10 01:28:32 dlg Exp $ */
+/* $OpenBSD: mpii.c,v 1.93 2014/04/25 09:43:04 jsg Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
int
mpii_insert_dev(struct mpii_softc *sc, struct mpii_device *dev)
{
- int slot = dev->slot; /* initial hint */
+ int slot; /* initial hint */
- if (dev == NULL || slot < 0)
+ if (dev == NULL || dev->slot < 0)
return (1);
+ slot = dev->slot;
while (slot < sc->sc_max_devices && sc->sc_devs[slot] != NULL)
slot++;