mirror of
https://github.com/GOSTSec/ccminer
synced 2025-01-11 23:38:03 +00:00
nvs: fix fscanf return warning
This commit is contained in:
parent
79f8f71fc3
commit
1473a8fd6f
@ -78,9 +78,13 @@ int nvs_query_int(int nvs_id, const char* field, int showerr)
|
||||
fp = popen(command, "r");
|
||||
if (fp) {
|
||||
int intval = -1;
|
||||
if (!showerr)
|
||||
fscanf(fp, "%d", &intval);
|
||||
else {
|
||||
if (!showerr) {
|
||||
int b = fscanf(fp, "%d", &intval);
|
||||
if (!b) {
|
||||
pclose(fp);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
char msg[512] = { 0 };
|
||||
char buf[64] = { 0 };
|
||||
ssize_t bytes, len=0, maxlen=sizeof(msg)-1;
|
||||
|
Loading…
Reference in New Issue
Block a user