mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Code cleanup
Make precedence of && over || explicit. Explicitly convert between char * and unsigned char *. Don't assign potentially negative return code to an unsigend variable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e76675d4df
commit
b1538c809d
6 changed files with 18 additions and 15 deletions
|
@ -121,7 +121,8 @@ static int qt_serial_read(serial_t *device, void* data, unsigned int size)
|
|||
if (device == NULL || device->socket == NULL)
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
unsigned int nbytes = 0, rc;
|
||||
unsigned int nbytes = 0;
|
||||
int rc;
|
||||
|
||||
while(nbytes < size)
|
||||
{
|
||||
|
@ -152,7 +153,8 @@ static int qt_serial_write(serial_t *device, const void* data, unsigned int size
|
|||
if (device == NULL || device->socket == NULL)
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
|
||||
unsigned int nbytes = 0, rc;
|
||||
unsigned int nbytes = 0;
|
||||
int rc;
|
||||
|
||||
while(nbytes < size)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue