xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit fbbdea8321a7437b29ef30c133ea169e70be3516

Initialize multi field of the key_info_t structure
Also made code in remove_user_keys() and find_user_keys() a bit better.

Suggested by clang static analyzer.
Author: xaizek
Author date (UTC): 2013-01-06 18:54
Committer name: xaizek
Committer date (UTC): 2013-01-06 19:28
Parent(s): d7db8482df0a65c0a42e23e39b8d928d497d2e1e
Signing key:
Tree: a7a6c3e260dd62eecc26046075402ef33f83e181
File Lines added Lines deleted
src/dir_stack.c 1 1
src/engine/keys.c 5 7
File src/dir_stack.c changed (mode: 100644) (index c81ec0a1e..e6c1c2a90)
... ... popd(void)
74 74 if(stack_top == 0) if(stack_top == 0)
75 75 return -1; return -1;
76 76
77 stack_top -= 1;
77 stack_top--;
78 78
79 79 if(change_directory(&lwin, stack[stack_top].lpane_dir) >= 0) if(change_directory(&lwin, stack[stack_top].lpane_dir) >= 0)
80 80 load_dir_list(&lwin, 0); load_dir_list(&lwin, 0);
File src/engine/keys.c changed (mode: 100644) (index cbd2e60de..efecf7755)
... ... execute_keys_inner(const wchar_t keys[], keys_info_t *keys_info, int no_remap,
259 259 return 0; return 0;
260 260 keys = get_count(keys, &key_info.count); keys = get_count(keys, &key_info.count);
261 261 key_info.count = combine_counts(key_info.count, prev_count); key_info.count = combine_counts(key_info.count, prev_count);
262 key_info.multi = L'\0';
262 263 root = keys_info->selector ? &selectors_root[*mode] : &user_cmds_root[*mode]; root = keys_info->selector ? &selectors_root[*mode] : &user_cmds_root[*mode];
263 264
264 265 if(!no_remap) if(!no_remap)
 
... ... remove_user_keys(const wchar_t *keys, int mode)
665 666
666 667 do do
667 668 { {
668 key_chunk_t *parent = curr->parent;
669 key_chunk_t *const parent = curr->parent;
669 670 if(curr->prev != NULL) if(curr->prev != NULL)
670 671 curr->prev->next = curr->next; curr->prev->next = curr->next;
671 672 else else
 
... ... remove_user_keys(const wchar_t *keys, int mode)
685 686 static key_chunk_t * static key_chunk_t *
686 687 find_user_keys(const wchar_t *keys, int mode) find_user_keys(const wchar_t *keys, int mode)
687 688 { {
688 key_chunk_t *curr = &user_cmds_root[mode], *p;
689 key_chunk_t *curr = &user_cmds_root[mode];
689 690 while(*keys != L'\0') while(*keys != L'\0')
690 691 { {
691 p = curr->child;
692 key_chunk_t *p = curr->child;
692 693 while(p != NULL && p->key < *keys) while(p != NULL && p->key < *keys)
693 694 p = p->next; p = p->next;
694 695 if(p == NULL || p->key != *keys) if(p == NULL || p->key != *keys)
 
... ... find_user_keys(const wchar_t *keys, int mode)
696 697 curr = p; curr = p;
697 698 keys++; keys++;
698 699 } }
699
700 if(curr->conf.type != USER_CMD)
701 return NULL;
702 return curr;
700 return (curr->conf.type == USER_CMD) ? curr : NULL;
703 701 } }
704 702
705 703 TSTATIC key_conf_t * TSTATIC key_conf_t *
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master