diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-12-06 13:49:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 13:49:04 +0100 |
commit | b67054aa39702276d1dd7cd5a469fffed5a72144 (patch) | |
tree | 5918025b5577c86a77168013b1aaeff92abd0c7f /src/plugins | |
parent | 6c3e6a5262c6009f43dddb6fd5a2fc8204520eef (diff) | |
parent | 5355c9b856824cbe63d5fcfeb35ec83f8fe804f7 (diff) | |
download | profani-tty-b67054aa39702276d1dd7cd5a469fffed5a72144.tar.gz |
Merge branch 'master' into xep/xep0107-user-mood
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/callbacks.c | 2 | ||||
-rw-r--r-- | src/plugins/python_api.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/callbacks.c b/src/plugins/callbacks.c index 92c0a9f4..4a73f15b 100644 --- a/src/plugins/callbacks.c +++ b/src/plugins/callbacks.c @@ -82,7 +82,7 @@ _free_command_help(CommandHelp* help) free(help->desc); i = 0; - while (help->args[i] != NULL && help->args[i][0] != NULL) { + while (help->args[i][0] != NULL) { free(help->args[i][0]); free(help->args[i][1]); i++; diff --git a/src/plugins/python_api.c b/src/plugins/python_api.c index 8ea54514..90e33579 100644 --- a/src/plugins/python_api.c +++ b/src/plugins/python_api.c @@ -158,7 +158,7 @@ python_api_register_command(PyObject* self, PyObject* args) c_synopsis[len] = NULL; Py_ssize_t args_len = PyList_Size(arguments); - char* c_arguments[args_len == 0 ? 0 : args_len + 1][2]; + char* c_arguments[args_len + 1][2]; for (i = 0; i < args_len; i++) { PyObject* item = PyList_GetItem(arguments, i); Py_ssize_t len2 = PyList_Size(item); @@ -196,7 +196,7 @@ python_api_register_command(PyObject* self, PyObject* args) free(c_synopsis[i++]); } i = 0; - while (c_arguments[i] != NULL && c_arguments[i][0] != NULL) { + while (c_arguments[i][0] != NULL) { free(c_arguments[i][0]); free(c_arguments[i][1]); i++; |