summaryrefslogtreecommitdiffstats
path: root/libvncserver
diff options
context:
space:
mode:
authorRemi Gacogne <rgacogne@coredump.fr>2018-11-28 21:08:15 +0100
committerRemi Gacogne <rgacogne@coredump.fr>2018-11-28 21:08:15 +0100
commit716bd27235fe6462271e799a758f2682fa4cb1de (patch)
treeaf4d6fab87bf3c56e2d726643d2bee56ccadb40f /libvncserver
parent1452b9a6ae082382215a8d0ddcdbb38df38d9aeb (diff)
downloadlibtdevnc-716bd27235fe6462271e799a758f2682fa4cb1de.tar.gz
libtdevnc-716bd27235fe6462271e799a758f2682fa4cb1de.zip
Fix -Wmisleading-indentation warnings
Diffstat (limited to 'libvncserver')
-rw-r--r--libvncserver/tableinit24.c11
-rw-r--r--libvncserver/websockets.c11
2 files changed, 13 insertions, 9 deletions
diff --git a/libvncserver/tableinit24.c b/libvncserver/tableinit24.c
index 39e9920..5c5823c 100644
--- a/libvncserver/tableinit24.c
+++ b/libvncserver/tableinit24.c
@@ -147,11 +147,12 @@ rfbInitOneRGBTable24 (uint8_t *table, int inMax, int outMax, int outShift,
for (i = 0; i < nEntries; i++) {
outValue = ((i * outMax + inMax / 2) / inMax) << outShift;
*(uint32_t *)&table[3*i] = outValue;
- if(!rfbEndianTest)
+ if(!rfbEndianTest) {
memmove(table+3*i,table+3*i+1,3);
- if (swap) {
- c = table[3*i]; table[3*i] = table[3*i+2];
- table[3*i+2] = c;
- }
+ }
+ if (swap) {
+ c = table[3*i]; table[3*i] = table[3*i+2];
+ table[3*i+2] = c;
+ }
}
}
diff --git a/libvncserver/websockets.c b/libvncserver/websockets.c
index d91c4f2..616c81c 100644
--- a/libvncserver/websockets.c
+++ b/libvncserver/websockets.c
@@ -198,12 +198,15 @@ webSocketsHandshake(rfbClientPtr cl, char *scheme)
if ((n < 0) && (errno == ETIMEDOUT)) {
break;
}
- if (n == 0)
+ if (n == 0) {
rfbLog("webSocketsHandshake: client gone\n");
- else
+ }
+ else {
rfbLogPerror("webSocketsHandshake: read");
- free(response);
- free(buf);
+ }
+
+ free(response);
+ free(buf);
return FALSE;
}