diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-10 13:08:14 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2004-08-10 13:08:14 +0000 |
commit | 80dff343783507cb364c05f4fb41dad662eba838 (patch) | |
tree | fef31ecab951453035f83f47a1cfdb9c78038996 /usr.sbin | |
parent | 8babc5b23252c7e76e17692fe161aae7ab7cd71f (diff) |
style, use sizeof() instead of a hardcoded value.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/rde_attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_attr.c b/usr.sbin/bgpd/rde_attr.c index fe1a6c1c492..fc51ebcbf30 100644 --- a/usr.sbin/bgpd/rde_attr.c +++ b/usr.sbin/bgpd/rde_attr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_attr.c,v 1.42 2004/08/06 12:04:08 claudio Exp $ */ +/* $OpenBSD: rde_attr.c,v 1.43 2004/08/10 13:08:13 claudio Exp $ */ /* * Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org> @@ -50,7 +50,7 @@ attr_write(void *p, u_int16_t p_len, u_int8_t flags, u_int8_t type, *b++ = type; if (data_len > 255) { tmp = htons(data_len); - memcpy(b, &tmp, 2); + memcpy(b, &tmp, sizeof(tmp)); b += 2; } else *b++ = (u_char)(data_len & 0xff); |