Fix coverity defects
This commit is contained in:
parent
33dd3236de
commit
1a8ef0772c
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ int main( int argc, char** argv )
|
|||
char buf[BUFFER_LEN];
|
||||
char *p = buf;
|
||||
char *end = p + BUFFER_LEN;
|
||||
char c;
|
||||
int c;
|
||||
|
||||
if( argc != 2 )
|
||||
{
|
||||
|
@ -83,7 +83,7 @@ int main( int argc, char** argv )
|
|||
}
|
||||
|
||||
while( ( c = fgetc( fp ) ) != EOF && p < end - 1 )
|
||||
*p++ = c;
|
||||
*p++ = (char)c;
|
||||
*p = '\0';
|
||||
|
||||
if( p - buf != 0 )
|
||||
|
|
Loading…
Reference in a new issue