mirror of
https://github.com/dvorka/hstr.git
synced 2025-02-25 07:16:28 +08:00
Merge pull request #257 from snehm/master
Fixing pointer initialisation to ensure correct tests especially on binaries compiled w/ optimizations.
This commit is contained in:
commit
2ae5f1a7a3
1 changed files with 9 additions and 9 deletions
18
src/hstr.c
18
src/hstr.c
|
@ -643,9 +643,9 @@ unsigned hstr_make_selection(char *prefix, HistoryItems *history, int maxSelecti
|
|||
bool regexpCompilationError=false;
|
||||
bool keywordsAllMatch;
|
||||
char *keywordsSavePtr=NULL;
|
||||
char *keywordsToken;
|
||||
char *keywordsParsedLine;
|
||||
char *keywordsPointerToDelete;
|
||||
char *keywordsToken=NULL;
|
||||
char *keywordsParsedLine=NULL;
|
||||
char *keywordsPointerToDelete=NULL;
|
||||
for(i=0; i<count && selectionCount<maxSelectionCount; i++) {
|
||||
if(source[i]) {
|
||||
if(!prefix || !strlen(prefix)) {
|
||||
|
@ -759,12 +759,12 @@ void print_selection_row(char *text, int y, int width, char *pattern)
|
|||
if(hstr->theme & HH_THEME_COLOR) {
|
||||
color_attr_on(COLOR_PAIR(HH_COLOR_MATCH));
|
||||
}
|
||||
char* p;
|
||||
char* pp;
|
||||
char* keywordsSavePtr;
|
||||
char* keywordsToken;
|
||||
char* keywordsParsedLine;
|
||||
char* keywordsPointerToDelete;
|
||||
char* p=NULL;
|
||||
char* pp=NULL;
|
||||
char* keywordsSavePtr=NULL;
|
||||
char* keywordsToken=NULL;
|
||||
char* keywordsParsedLine=NULL;
|
||||
char* keywordsPointerToDelete=NULL;
|
||||
|
||||
switch(hstr->historyMatch) {
|
||||
case HH_MATCH_SUBSTRING:
|
||||
|
|
Loading…
Reference in a new issue