mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 15:02:58 +02:00
Supplement to "libeplayer3: Standardize comparison order and improve code readability"
Origin commit data
------------------
Commit: 0737aa3ba6
Author: vanhofen <vanhofen@gmx.de>
Date: 2024-03-25 (Mon, 25 Mar 2024)
Origin message was:
------------------
- addition to "small fix"
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -213,7 +213,7 @@ static int kbhit(void)
|
||||
FD_SET(0, &readfds);
|
||||
FD_SET(g_pfd[0], &readfds);
|
||||
|
||||
if (-1 == select(g_pfd[0] + 1, &readfds, NULL, NULL, &tv))
|
||||
if (select(g_pfd[0] + 1, &readfds, NULL, NULL, &tv) == -1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -253,7 +253,7 @@ static void SetNice(int prio)
|
||||
sched_setscheduler(0, SCHED_RR, ¶m);
|
||||
#else
|
||||
//int prevPrio = getpriority(PRIO_PROCESS, 0);
|
||||
if (-1 == setpriority(PRIO_PROCESS, 0, prio))
|
||||
if (setpriority(PRIO_PROCESS, 0, prio) == -1)
|
||||
{
|
||||
printf("setpriority - failed\n");
|
||||
}
|
||||
@@ -390,7 +390,7 @@ static int HandleTracks(const Manager_t *ptrManager, const PlaybackCmd_t playbac
|
||||
ok = sscanf(argvBuff + 1, "%d", &id);
|
||||
}
|
||||
|
||||
if (id >= 0 || (1 == ok && id == -1))
|
||||
if (id >= 0 || (ok == 1 && id == -1))
|
||||
{
|
||||
commandRetVal = g_player->playback->Command(g_player, playbackSwitchCmd, (void *)&id);
|
||||
E2iSendMsg("{\"%c_%c\":{\"id\":%d,\"sts\":%d}}\n", argvBuff[0], 's', id, commandRetVal);
|
||||
@@ -843,7 +843,7 @@ int main(int argc, char *argv[])
|
||||
case 'o':
|
||||
{
|
||||
int flags = 0;
|
||||
if (1 == sscanf(argvBuff + 1, "%d", &flags))
|
||||
if (sscanf(argvBuff + 1, "%d", &flags) == 1)
|
||||
{
|
||||
progressive_playback_set(flags);
|
||||
E2iSendMsg("{\"PROGRESSIVE_DOWNLOAD\":{\"flags\":%d, \"sts\":0}}\n", flags);
|
||||
@@ -1022,7 +1022,7 @@ int main(int argc, char *argv[])
|
||||
free(g_player);
|
||||
}
|
||||
|
||||
if (isTermThreadStarted && 1 == write(g_pfd[1], "x", 1))
|
||||
if (isTermThreadStarted && write(g_pfd[1], "x", 1) == 1)
|
||||
{
|
||||
pthread_join(termThread, NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user