diff options
author | Max Kellermann <max@duempel.org> | 2013-01-04 01:10:48 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-04 01:16:22 +0100 |
commit | 77a99cc61d7a39745192354594086bb90ffb0b50 (patch) | |
tree | 20af4a14f4a380a0c54a531aea3380685b2fcf53 /src/CommandListBuilder.cxx | |
parent | fb337418a5b8d85306c96ad51d445fd58fb38491 (diff) | |
download | mpd-77a99cc61d7a39745192354594086bb90ffb0b50.tar.gz mpd-77a99cc61d7a39745192354594086bb90ffb0b50.tar.xz mpd-77a99cc61d7a39745192354594086bb90ffb0b50.zip |
CommandListBuilder: rename attributes
Diffstat (limited to 'src/CommandListBuilder.cxx')
-rw-r--r-- | src/CommandListBuilder.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/CommandListBuilder.cxx b/src/CommandListBuilder.cxx index 13cf4eea9..55b82a238 100644 --- a/src/CommandListBuilder.cxx +++ b/src/CommandListBuilder.cxx @@ -25,23 +25,23 @@ void CommandListBuilder::Reset() { - for (GSList *tmp = cmd_list; tmp != NULL; tmp = g_slist_next(tmp)) + for (GSList *tmp = list; tmp != NULL; tmp = g_slist_next(tmp)) g_free(tmp->data); - g_slist_free(cmd_list); + g_slist_free(list); - cmd_list = nullptr; - cmd_list_OK = -1; + list = nullptr; + mode = Mode::DISABLED; } bool CommandListBuilder::Add(const char *cmd) { size_t len = strlen(cmd) + 1; - cmd_list_size += len; - if (cmd_list_size > client_max_command_list_size) + size += len; + if (size > client_max_command_list_size) return false; - cmd_list = g_slist_prepend(cmd_list, g_strdup(cmd)); + list = g_slist_prepend(list, g_strdup(cmd)); return true; } |