forked from aniani/vim
patch 7.4.822
Problem: More problems reported by coverity. Solution: Avoid the warnings. (Christian Brabandt)
This commit is contained in:
@@ -1076,8 +1076,8 @@ err_closing:
|
||||
/*
|
||||
* PRIVATE: cs_find
|
||||
*
|
||||
* query cscope using command line interface. parse the output and use tselect
|
||||
* to allow choices. like Nvi, creates a pipe to send to/from query/cscope.
|
||||
* Query cscope using command line interface. Parse the output and use tselect
|
||||
* to allow choices. Like Nvi, creates a pipe to send to/from query/cscope.
|
||||
*
|
||||
* returns TRUE if we jump to a tag or abort, FALSE if not.
|
||||
*/
|
||||
@@ -1214,7 +1214,10 @@ cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline)
|
||||
|
||||
nummatches = (int *)alloc(sizeof(int)*csinfo_size);
|
||||
if (nummatches == NULL)
|
||||
{
|
||||
vim_free(cmd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Send query to all open connections, then count the total number
|
||||
* of matches so we can alloc all in one swell foop. */
|
||||
@@ -1289,7 +1292,7 @@ cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline)
|
||||
# ifdef FEAT_WINDOWS
|
||||
if (postponed_split != 0)
|
||||
{
|
||||
win_split(postponed_split > 0 ? postponed_split : 0,
|
||||
(void)win_split(postponed_split > 0 ? postponed_split : 0,
|
||||
postponed_split_flags);
|
||||
RESET_BINDING(curwin);
|
||||
postponed_split = 0;
|
||||
@@ -2085,6 +2088,8 @@ cs_print_tags_priv(matches, cntxts, num_matches)
|
||||
|
||||
strcpy(tbuf, matches[0]);
|
||||
ptag = strtok(tbuf, "\t");
|
||||
if (ptag == NULL)
|
||||
return;
|
||||
|
||||
newsize = (int)(strlen(cstag_msg) + strlen(ptag));
|
||||
buf = (char *)alloc(newsize);
|
||||
|
Reference in New Issue
Block a user