Trivial changes from review of PR
This commit is contained in:
parent
06704e041a
commit
da9a682647
@ -14,4 +14,3 @@ config CANUTILS_CANLIB
|
||||
if CANUTILS_CANLIB
|
||||
|
||||
endif
|
||||
|
||||
|
@ -70,7 +70,7 @@ int canlib_getbaud(int fd, FAR int *bauds)
|
||||
struct canioc_bittiming_s timings;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno);
|
||||
return 0;
|
||||
|
@ -71,7 +71,7 @@ int canlib_getloopback(int fd, FAR bool *loopback)
|
||||
struct canioc_connmodes_s connmodes;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno);
|
||||
return FALSE;
|
||||
|
@ -71,7 +71,7 @@ int canlib_getsilent(int fd, FAR bool *silent)
|
||||
struct canioc_connmodes_s connmodes;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno);
|
||||
return FALSE;
|
||||
|
@ -70,18 +70,19 @@ int canlib_setbaud(int fd, int bauds)
|
||||
struct canioc_bittiming_s timings;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
timings.bt_baud = bauds;
|
||||
ret = ioctl(fd, CANIOC_SET_BITTIMING, (unsigned long)&timings);
|
||||
|
||||
if (ret!=OK)
|
||||
ret = ioctl(fd, CANIOC_SET_BITTIMING, (unsigned long)&timings);
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_SET_BITTIMING failed, errno=%d\n", errno);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -72,18 +72,19 @@ int canlib_setloopback(int fd, bool loopback)
|
||||
struct canioc_connmodes_s connmodes;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
connmodes.bm_loopback = !!loopback;
|
||||
ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes);
|
||||
|
||||
if (ret!=OK)
|
||||
ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -72,18 +72,19 @@ int canlib_setsilent(int fd, bool silent)
|
||||
struct canioc_connmodes_s connmodes;
|
||||
|
||||
ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret!=OK)
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno);
|
||||
return ret;
|
||||
}
|
||||
|
||||
connmodes.bm_silent = !!silent;
|
||||
ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes);
|
||||
|
||||
if (ret!=OK)
|
||||
ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes);
|
||||
if (ret != OK)
|
||||
{
|
||||
canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user