aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2009-06-09 08:09:30 +0000
committerHiroki Sato <hrs@FreeBSD.org>2009-06-09 08:09:30 +0000
commit4cd5f57d6bbd9c062c32e27a4cc58cd7f26080c2 (patch)
tree7b647980987bdc79f3a7b85acbc0491a4a8b8245
parentb65cb1db3c90960f2509826c5b1a4a14c7f13090 (diff)
Notes
-rw-r--r--sys/net/if_gif.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index d8fb54b137f3..2edab95217e2 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -912,13 +912,13 @@ gif_ioctl(ifp, cmd, data)
case GIFSOPTS:
if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0)
break;
- if (!(error = copyin(ifr->ifr_data, &options,
- sizeof(options)))) {
- if ((options | GIF_OPTMASK) == GIF_OPTMASK)
- sc->gif_options = options;
- else
- error = EINVAL;
- }
+ error = copyin(ifr->ifr_data, &options, sizeof(options));
+ if (error)
+ break;
+ if (options & ~GIF_OPTMASK)
+ error = EINVAL;
+ else
+ sc->gif_options = options;
break;
default: