diff options
author | Ben Pfaff <blp@nicira.com> | 2011-03-21 13:15:31 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-04-01 15:52:20 -0700 |
commit | 02c9ed77e316ef38d89a17a184e0b497615258fa (patch) | |
tree | cf49054431bb75b5b1c489e5fe72306224cd3d5f /lib | |
parent | 3e519d8e848874eade1d049bac4acbc10b78008d (diff) |
lacp: Fix misleading prototype for lacp_configure().
Only the first 6 bytes (ETH_ADDR_LEN) of the 'sys_id' argument are used,
but the prototype declared it as an array of 8 bytes. This has no effect
on the generated code--the declared size of an array parameter is
irrelevant--but it is misleading.
Also, add 'const' since the array is not modified.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lacp.c | 2 | ||||
-rw-r--r-- | lib/lacp.h | 4 |
2 files changed, 4 insertions, 2 deletions
@@ -128,7 +128,7 @@ lacp_destroy(struct lacp *lacp) * 'active' parameters. */ void lacp_configure(struct lacp *lacp, const char *name, - uint8_t sys_id[ETH_ADDR_LEN], uint16_t sys_priority, + const uint8_t sys_id[ETH_ADDR_LEN], uint16_t sys_priority, bool active, bool fast) { if (!lacp->name || strcmp(name, lacp->name)) { @@ -19,6 +19,7 @@ #include <stdbool.h> #include <stdint.h> +#include "packets.h" struct ds; struct lacp; @@ -31,7 +32,8 @@ typedef void lacp_send_pdu(void *slave, const struct lacp_pdu *); void lacp_init(void); struct lacp *lacp_create(void); void lacp_destroy(struct lacp *); -void lacp_configure(struct lacp *, const char *name, uint8_t sys_id[8], +void lacp_configure(struct lacp *, const char *name, + const uint8_t sys_id[ETH_ADDR_LEN], uint16_t sys_priority, bool active, bool fast); void lacp_process_pdu(struct lacp *, const void *slave, const struct lacp_pdu *); |