aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples/tx_samples_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/examples/tx_samples_c.c')
-rw-r--r--host/examples/tx_samples_c.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/host/examples/tx_samples_c.c b/host/examples/tx_samples_c.c
index 5a4b79005..3035297fd 100644
--- a/host/examples/tx_samples_c.c
+++ b/host/examples/tx_samples_c.c
@@ -102,19 +102,19 @@ int main(int argc, char* argv[]){
// Create USRP
uhd_usrp_handle usrp;
fprintf(stderr, "Creating USRP with args \"%s\"...\n", device_args);
- EXECUTE_OR_GOTO(free_usrp,
+ EXECUTE_OR_GOTO(free_option_strings,
uhd_usrp_make(&usrp, device_args)
)
// Create TX streamer
uhd_tx_streamer_handle tx_streamer;
- EXECUTE_OR_GOTO(free_tx_streamer,
+ EXECUTE_OR_GOTO(free_usrp,
uhd_tx_streamer_make(&tx_streamer)
)
// Create TX metadata
uhd_tx_metadata_handle md;
- EXECUTE_OR_GOTO(free_tx_metadata,
+ EXECUTE_OR_GOTO(free_tx_streamer,
uhd_tx_metadata_make(&md, false, 0.0, 0.1, true, false)
)
@@ -224,7 +224,7 @@ int main(int argc, char* argv[]){
if(verbose){
fprintf(stderr, "Cleaning up USRP.\n");
}
- if(return_code != EXIT_SUCCESS){
+ if(return_code != EXIT_SUCCESS && usrp != NULL){
uhd_usrp_last_error(usrp, error_string, 512);
fprintf(stderr, "USRP reported the following error: %s\n", error_string);
}
@@ -235,7 +235,7 @@ int main(int argc, char* argv[]){
free(device_args);
}
- fprintf(stderr, (return_code ? "Failure" : "Success"));
+ fprintf(stderr, (return_code ? "Failure\n" : "Success\n"));
return return_code;
}