Safely call hackrf_close() after resetting the HackRF

This commit is contained in:
Dominic Spill
2017-01-27 16:08:57 -07:00
parent 9e78ccb4e7
commit da743b84ef

View File

@ -313,7 +313,8 @@ int main(int argc, char** argv)
fd = NULL;
return EXIT_FAILURE;
}
} else {
}
result = hackrf_close(device);
if (result != HACKRF_SUCCESS) {
fprintf(stderr, "hackrf_close() failed: %s (%d)\n",
@ -322,7 +323,6 @@ int main(int argc, char** argv)
fd = NULL;
return EXIT_FAILURE;
}
}
hackrf_exit();