aboutsummaryrefslogtreecommitdiffstats
path: root/src/jo_main.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:18:20 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:18:20 +0200
commit754010fba962a7fe859e7f2efb977ec4eff04920 (patch)
treec0fbd9dd5513d43f0bf0ba84bd91a3117409078f /src/jo_main.c
parentRead function is good (diff)
downloadlowbat-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.c8
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);
}