From 5d16c4c32434fc62dd2283aac96c9a79ba840935 Mon Sep 17 00:00:00 2001 From: Phil Karn Date: Thu, 3 Aug 2023 00:25:11 -0700 Subject: [PATCH] again... --- funcube.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/funcube.c b/funcube.c index 84b9d5a8..742ad51e 100644 --- a/funcube.c +++ b/funcube.c @@ -428,7 +428,7 @@ double funcube_tune(struct frontend * const frontend,double const freq){ if(sdr->tunestate == NULL){ char *tmp = NULL; int r = asprintf(&tmp,"%s/tune-funcube.%d",VARDIR,sdr->number); - if(r != 0 && tmp != NULL){ + if(r > 0 && tmp != NULL){ sdr->tunestate = fopen(tmp,"r+"); if(!sdr->tunestate) fprintf(stdout,"Can't open tuner state file %s: %s\n",tmp,strerror(errno));