diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-16 19:18:20 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-16 19:18:20 +0200 |
commit | 754010fba962a7fe859e7f2efb977ec4eff04920 (patch) | |
tree | c0fbd9dd5513d43f0bf0ba84bd91a3117409078f /src/jo_main.c | |
parent | Read function is good (diff) | |
download | lowbat-bsd-754010fba962a7fe859e7f2efb977ec4eff04920.tar.gz lowbat-bsd-754010fba962a7fe859e7f2efb977ec4eff04920.tar.bz2 lowbat-bsd-754010fba962a7fe859e7f2efb977ec4eff04920.tar.xz lowbat-bsd-754010fba962a7fe859e7f2efb977ec4eff04920.tar.zst lowbat-bsd-754010fba962a7fe859e7f2efb977ec4eff04920.zip |
Better read function
Diffstat (limited to 'src/jo_main.c')
-rw-r--r-- | src/jo_main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/jo_main.c b/src/jo_main.c index 2d19ab8..e5576b3 100644 --- a/src/jo_main.c +++ b/src/jo_main.c @@ -21,13 +21,11 @@ int main(void) { - char *status; + int8_t status; - if (!(status = jo_f_status())) { + if ((status = jo_f_status()) < 0) { return (JO_RET_RD_FAILED); } - printf("status: %s\n", status); - free(status); - status = NULL; + printf("status: %d\n", status); return (JO_RET_FINE); } |