diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-01-31 05:53:09 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-01-31 05:53:09 +0000 |
commit | 4d75ba781299393d8cd5dd880caa808c168189a6 (patch) | |
tree | 4696499772d5463b447a63ff99d9379895c33182 /usr.sbin | |
parent | afc6b5d5d8c7d453afb22fa22bf2a81da7b6445f (diff) |
Use the sizeof operator on a struct not a pointer to one.
ok rzalamena@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/switchctl/switchctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/switchctl/switchctl.c b/usr.sbin/switchctl/switchctl.c index 144ae131ea6..2d57e47300c 100644 --- a/usr.sbin/switchctl/switchctl.c +++ b/usr.sbin/switchctl/switchctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: switchctl.c,v 1.6 2016/11/24 09:23:11 reyk Exp $ */ +/* $OpenBSD: switchctl.c,v 1.7 2017/01/31 05:53:08 jsg Exp $ */ /* * Copyright (c) 2007-2015 Reyk Floeter <reyk@openbsd.org> @@ -227,7 +227,7 @@ main(int argc, char *argv[]) } to = &swc.swc_target; - memcpy(&to, &res->uri, sizeof(to)); + memcpy(to, &res->uri, sizeof(*to)); imsg_compose(ibuf, IMSG_CTL_CONNECT, 0, 0, -1, &swc, sizeof(swc)); |