Update hackrf_sweep.c

change if ( fd != NULL ) to if ( ( fd != NULL ) && ( fd != stdout ) )
before fclose( fd );
This commit is contained in:
ggatis
2020-06-16 13:55:50 +03:00
committed by GitHub
parent 43e6f99fe8
commit 38f6d4c828

View File

@ -757,7 +757,7 @@ int main(int argc, char** argv) {
fprintf(stderr, "hackrf_exit() done\n");
}
if(fd != NULL) {
if ( ( fd != NULL ) && ( fd != stdout ) ) {
fclose(fd);
fd = NULL;
fprintf(stderr, "fclose(fd) done\n");