lemon: remove scan-build warning in errline().

Warning: Argument with 'nonnull' attribute passed null.

Change-Id: Ie46733ae8663161b957acaabbaa2da539018693d
Reviewed-on: https://code.wireshark.org/review/26704
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Dario Lombardo 2018-04-01 21:59:33 +02:00 committed by Alexis La Goutte
parent c462fa8936
commit 02ef13fac7
1 changed files with 5 additions and 3 deletions

View File

@ -1964,9 +1964,11 @@ static FILE *errstream;
*/
static void errline(int n, int k, FILE *err)
{
int spcnt, i;
if( argv[0] ) fprintf(err,"%s",argv[0]);
spcnt = lemonStrlen(argv[0]) + 1;
int spcnt = 0, i;
if( argv[0] ) {
fprintf(err,"%s",argv[0]);
spcnt = lemonStrlen(argv[0]) + 1;
}
for(i=1; i<n && argv[i]; i++){
fprintf(err," %s",argv[i]);
spcnt += lemonStrlen(argv[i])+1;