diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2022-08-02 20:20:06 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-02 20:20:06 -0400 | 
| commit | c61a427870be382db51729689981717d0ada0baa (patch) | |
| tree | 9e2e3b417cf94dd62cd987923a1b10445e47d02c /lib | |
| parent | 83721768462bbb020b99373d3f9d9eb4a40c49b9 (diff) | |
| parent | 9bf9bd1a0b818f8cd1554ef07d47028247703b75 (diff) | |
Merge pull request #11715 from Orange-OpenSource/link_state
lib: Correct valgrind errors
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/link_state.c | 6 | ||||
| -rw-r--r-- | lib/link_state.h | 2 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/link_state.c b/lib/link_state.c index 639a1d37d8..0ef87b7a51 100644 --- a/lib/link_state.c +++ b/lib/link_state.c @@ -1357,7 +1357,6 @@ struct ls_message *ls_parse_msg(struct stream *s)  	/* Read LS Message header */  	STREAM_GETC(s, msg->event);  	STREAM_GETC(s, msg->type); -	STREAM_GET(&msg->remote_id, s, sizeof(struct ls_node_id));  	/* Read Message Payload */  	switch (msg->type) { @@ -1365,6 +1364,7 @@ struct ls_message *ls_parse_msg(struct stream *s)  		msg->data.node = ls_parse_node(s);  		break;  	case LS_MSG_TYPE_ATTRIBUTES: +		STREAM_GET(&msg->remote_id, s, sizeof(struct ls_node_id));  		msg->data.attr = ls_parse_attributes(s);  		break;  	case LS_MSG_TYPE_PREFIX: @@ -1563,13 +1563,14 @@ static int ls_format_msg(struct stream *s, struct ls_message *msg)  	/* Prepare Link State header */  	stream_putc(s, msg->event);  	stream_putc(s, msg->type); -	stream_put(s, &msg->remote_id, sizeof(struct ls_node_id));  	/* Add Message Payload */  	switch (msg->type) {  	case LS_MSG_TYPE_NODE:  		return ls_format_node(s, msg->data.node);  	case LS_MSG_TYPE_ATTRIBUTES: +		/* Add remote node first */ +		stream_put(s, &msg->remote_id, sizeof(struct ls_node_id));  		return ls_format_attributes(s, msg->data.attr);  	case LS_MSG_TYPE_PREFIX:  		return ls_format_prefix(s, msg->data.prefix); @@ -1625,7 +1626,6 @@ int ls_send_msg(struct zclient *zclient, struct ls_message *msg,  	return zclient_send_message(zclient);  } -  struct ls_message *ls_vertex2msg(struct ls_message *msg,  				 struct ls_vertex *vertex)  { diff --git a/lib/link_state.h b/lib/link_state.h index f46a2068a1..ed315452da 100644 --- a/lib/link_state.h +++ b/lib/link_state.h @@ -91,7 +91,7 @@ struct ls_node_id {  			uint8_t level;			/* ISIS Level */  			uint8_t padding;  		} iso; -	} id __attribute__((aligned(8))); +	} id;  };  /**  | 
