Skip to content
Snippets Groups Projects
Commit f4cd4a63 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Removed unnecessary deallocation (bug 564585)


Signed-off-by: default avatarBotond Baranyi <botond.baranyi@ericsson.com>
Change-Id: I4d20e7e45f2fd2ca5e561552c15d5c52647f33b2
Signed-off-by: default avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent ea35cdf1
No related branches found
No related tags found
No related merge requests found
...@@ -169,10 +169,10 @@ CHARSTRING::CHARSTRING(const UNIVERSAL_CHARSTRING& other_value) ...@@ -169,10 +169,10 @@ CHARSTRING::CHARSTRING(const UNIVERSAL_CHARSTRING& other_value)
for (int i = 0; i < n_chars; ++i) { for (int i = 0; i < n_chars; ++i) {
const universal_char& uc = other_value.val_ptr->uchars_ptr[i]; const universal_char& uc = other_value.val_ptr->uchars_ptr[i];
if (uc.uc_group != 0 || uc.uc_plane != 0 || uc.uc_row != 0 || uc.uc_cell > 127) { if (uc.uc_group != 0 || uc.uc_plane != 0 || uc.uc_row != 0 || uc.uc_cell > 127) {
Free(val_ptr); Free(val_ptr);
TTCN_error("Non-ASCII characters cannot be used to initialize a charstring, " TTCN_error("Non-ASCII characters cannot be used to initialize a charstring, "
"invalid character char(%u, %u, %u, %u) at index %d.", "invalid character char(%u, %u, %u, %u) at index %d.",
uc.uc_group, uc.uc_plane, uc.uc_row, uc.uc_cell, i); uc.uc_group, uc.uc_plane, uc.uc_row, uc.uc_cell, i);
} }
val_ptr->chars_ptr[i] = other_value.val_ptr->uchars_ptr[i].uc_cell; val_ptr->chars_ptr[i] = other_value.val_ptr->uchars_ptr[i].uc_cell;
} }
...@@ -244,7 +244,6 @@ CHARSTRING& CHARSTRING::operator=(const UNIVERSAL_CHARSTRING& other_value) ...@@ -244,7 +244,6 @@ CHARSTRING& CHARSTRING::operator=(const UNIVERSAL_CHARSTRING& other_value)
for (int i = 0; i < n_chars; ++i) { for (int i = 0; i < n_chars; ++i) {
const universal_char& uc = other_value.val_ptr->uchars_ptr[i]; const universal_char& uc = other_value.val_ptr->uchars_ptr[i];
if (uc.uc_group != 0 || uc.uc_plane != 0 || uc.uc_row != 0 || uc.uc_cell > 127) { if (uc.uc_group != 0 || uc.uc_plane != 0 || uc.uc_row != 0 || uc.uc_cell > 127) {
Free(val_ptr);
TTCN_error("Non-ASCII characters cannot be assigned to a charstring, " TTCN_error("Non-ASCII characters cannot be assigned to a charstring, "
"invalid character char(%u, %u, %u, %u) at index %d.", "invalid character char(%u, %u, %u, %u) at index %d.",
uc.uc_group, uc.uc_plane, uc.uc_row, uc.uc_cell, i); uc.uc_group, uc.uc_plane, uc.uc_row, uc.uc_cell, i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment