Private
Public Access
2
0

gpio: use strtol instead of atoi

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2014-05-02 16:32:53 +01:00
parent 09cec0931b
commit 60c90be693

View File

@@ -149,7 +149,9 @@ maa_gpio_read(maa_gpio_context *dev)
char buffer[2];
fread(buffer, 2, 1, dev->value_fp);
fseek(dev->value_fp, SEEK_SET, 0);
return atoi(buffer);
int ret = strtol(buffer, NULL, 10);
return ret;
}
maa_result_t