unified error check code style

This commit is contained in:
Juri Glass 2011-08-22 18:13:36 +02:00
parent d0a6ab7a33
commit 7c39e62dd5
4 changed files with 12 additions and 19 deletions

View file

@ -41,13 +41,10 @@ sml_attention_response *sml_attention_response_parse(sml_buffer *buf){
msg->server_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->attention_number = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->attention_message = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->attention_details = sml_tree_parse(buf);
if (sml_buf_has_errors(buf)) goto error;

View file

@ -54,19 +54,15 @@ sml_get_list_request *sml_get_list_request_parse(sml_buffer *buf) {
}
msg->client_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_has_errors(buf)) goto error;
msg->server_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_has_errors(buf)) goto error;
msg->username = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_has_errors(buf)) goto error;
msg->password = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_has_errors(buf)) goto error;
msg->list_name = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (sml_buf_has_errors(buf)) goto error;
return msg;

View file

@ -41,22 +41,16 @@ sml_get_list_response *sml_get_list_response_parse(sml_buffer *buf) {
msg->client_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->server_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->list_name = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->act_sensor_time = sml_time_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->val_list = sml_list_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->list_signature = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->act_gateway_time = sml_time_parse(buf);
if (sml_buf_has_errors(buf)) goto error;

View file

@ -74,12 +74,19 @@ sml_get_profile_pack_request *sml_get_profile_pack_request_parse(sml_buffer *buf
}
msg->server_id = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->username = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->password = sml_octet_string_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->with_rawdata = sml_boolean_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->begin_time = sml_time_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->end_time = sml_time_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
msg->parameter_tree_path = sml_tree_path_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
if (!sml_buf_optional_is_skipped(buf)) {
if (sml_buf_get_next_type(buf) != SML_TYPE_LIST) {
@ -106,7 +113,6 @@ sml_get_profile_pack_request *sml_get_profile_pack_request_parse(sml_buffer *buf
}
msg->das_details = sml_tree_parse(buf);
if (sml_buf_has_errors(buf)) goto error;
return msg;