[TD_543] fix coverity scan, cid:267747
This commit is contained in:
parent
894ad481f4
commit
9e221b8a53
|
@ -148,7 +148,11 @@ static void shellSourceFile(TAOS *con, char *fptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fname = full_path.we_wordv[0];
|
char *fname = full_path.we_wordv[0];
|
||||||
|
if (fname == NULL) {
|
||||||
|
fprintf(stderr, "ERROR: invalid filename\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (access(fname, F_OK) != 0) {
|
if (access(fname, F_OK) != 0) {
|
||||||
fprintf(stderr, "ERROR: file %s is not exist\n", fptr);
|
fprintf(stderr, "ERROR: file %s is not exist\n", fptr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue