mirror of
https://gitlab.com/mobian1/eg25-manager.git
synced 2025-08-29 23:32:14 +02:00
manager: get rid of compiler warnings
This commit is contained in:
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
struct EG25Manager manager;
|
struct EG25Manager manager;
|
||||||
char compatible[32];
|
char compatible[32];
|
||||||
int fd;
|
int fd, ret;
|
||||||
|
|
||||||
memset(&manager, 0, sizeof(manager));
|
memset(&manager, 0, sizeof(manager));
|
||||||
manager.at_fd = -1;
|
manager.at_fd = -1;
|
||||||
@@ -172,8 +172,8 @@ int main(int argc, char *argv[])
|
|||||||
g_critical("Unable to read 'compatible' string from device tree");
|
g_critical("Unable to read 'compatible' string from device tree");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
read(fd, compatible, sizeof(compatible));
|
ret = read(fd, compatible, sizeof(compatible));
|
||||||
if (!strstr(compatible, "pine64,pinephone-1.2"))
|
if (ret > 0 && !strstr(compatible, "pine64,pinephone-1.2"))
|
||||||
manager.braveheart = TRUE;
|
manager.braveheart = TRUE;
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user