aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2015-12-29 00:05:54 +0100
committerStig Bjørlykke <stig@bjorlykke.org>2015-12-28 23:18:27 +0000
commitdf9e7d59371121b6dc31dd93667cb78652e83ce5 (patch)
tree91e2fe085ea7f75ee15b5959d462619e9719336b /ui/qt
parent0d2947681c80e5e329b5ad234a672bee36e68163 (diff)
Code cleanup
This is a small code cleanup to sync with master-2.0. Change-Id: I96a0fbd8bbb7bfde9d69a9bf512de839b2ca1536 Reviewed-on: https://code.wireshark.org/review/12894 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/syntax_line_edit.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/qt/syntax_line_edit.cpp b/ui/qt/syntax_line_edit.cpp
index 5029687557..3d0e6e2cde 100644
--- a/ui/qt/syntax_line_edit.cpp
+++ b/ui/qt/syntax_line_edit.cpp
@@ -183,19 +183,17 @@ void SyntaxLineEdit::checkFieldName(QString field)
void SyntaxLineEdit::checkCustomColumn(QString fields)
{
- gchar **splitted_fields;
- guint i_field;
if (fields.isEmpty()) {
setSyntaxState(SyntaxLineEdit::Empty);
return;
}
- splitted_fields = g_regex_split_simple(COL_CUSTOM_PRIME_REGEX,
+ gchar **splitted_fields = g_regex_split_simple(COL_CUSTOM_PRIME_REGEX,
fields.toUtf8().constData(), G_REGEX_ANCHORED, G_REGEX_MATCH_ANCHORED);
- for (i_field =0; i_field < g_strv_length(splitted_fields); i_field += 1) {
- if (splitted_fields[i_field] && *splitted_fields[i_field]) {
- if (proto_check_field_name(splitted_fields[i_field]) != 0) {
+ for (guint i = 0; i < g_strv_length(splitted_fields); i++) {
+ if (splitted_fields[i] && *splitted_fields[i]) {
+ if (proto_check_field_name(splitted_fields[i]) != 0) {
setSyntaxState(SyntaxLineEdit::Invalid);
g_strfreev(splitted_fields);
return;