mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
quickfix: fix pvs/v547 errors
This commit is contained in:
parent
8732cce315
commit
56c860ac4a
@ -1554,6 +1554,7 @@ static int qf_add_entry(qf_info_T *qi, int qf_idx, char_u *dir, char_u *fname,
|
||||
* Allocate a new location list
|
||||
*/
|
||||
static qf_info_T *ll_new_list(void)
|
||||
FUNC_ATTR_NONNULL_RET
|
||||
{
|
||||
qf_info_T *qi = xcalloc(1, sizeof(qf_info_T));
|
||||
qi->qf_refcount++;
|
||||
@ -5650,7 +5651,7 @@ void ex_cexpr(exarg_T *eap)
|
||||
|
||||
// Get the location list for ":lhelpgrep"
|
||||
static qf_info_T *hgr_get_ll(bool *new_ll)
|
||||
FUNC_ATTR_NONNULL_ALL
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_NONNULL_RET
|
||||
{
|
||||
win_T *wp;
|
||||
qf_info_T *qi;
|
||||
@ -5670,9 +5671,7 @@ static qf_info_T *hgr_get_ll(bool *new_ll)
|
||||
}
|
||||
if (qi == NULL) {
|
||||
// Allocate a new location list for help text matches
|
||||
if ((qi = ll_new_list()) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
qi = ll_new_list();
|
||||
*new_ll = true;
|
||||
}
|
||||
|
||||
@ -5810,9 +5809,6 @@ void ex_helpgrep(exarg_T *eap)
|
||||
|
||||
if (eap->cmdidx == CMD_lhelpgrep) {
|
||||
qi = hgr_get_ll(&new_qi);
|
||||
if (qi == NULL) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
regmatch_T regmatch = {
|
||||
|
Loading…
Reference in New Issue
Block a user