summaryrefslogtreecommitdiffstats
path: root/qtserialbluetooth.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-06 13:59:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-06 13:59:14 -0700
commitb1538c809d0ce5abe489822f9d2b21287a0a38d5 (patch)
tree303fbcb44fbd14d0039293cdc7e9a34e8b2424ba /qtserialbluetooth.cpp
parente76675d4df466448a33532895dd371aa498a0e49 (diff)
downloadsubsurface-b1538c809d0ce5abe489822f9d2b21287a0a38d5.tar.gz
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>
Diffstat (limited to 'qtserialbluetooth.cpp')
-rw-r--r--qtserialbluetooth.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp
index 1f0ed6b47..dc67cf17f 100644
--- a/qtserialbluetooth.cpp
+++ b/qtserialbluetooth.cpp
@@ -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)
{