aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb
diff options
context:
space:
mode:
authorBrian P. Hinz <bphinz@users.sf.net>2017-11-16 17:46:15 -0500
committerBrian P. Hinz <bphinz@users.sf.net>2017-11-16 17:50:49 -0500
commit33d7832b19e8b8eb7e482ada89fe038f91082e04 (patch)
treeb4928faa25a991b47b7f73a0e41eb84727566d36 /common/rfb
parent1e14a3ee407c3dc23f64cbf3573487fc13996a0d (diff)
downloadtigervnc-33d7832b19e8b8eb7e482ada89fe038f91082e04.tar.gz
tigervnc-33d7832b19e8b8eb7e482ada89fe038f91082e04.zip
Fix "int-in-bool-context" compile errors
Diffstat (limited to 'common/rfb')
-rw-r--r--common/rfb/CMsgReader.cxx2
-rw-r--r--common/rfb/SMsgWriter.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx
index c325d48f..0271936e 100644
--- a/common/rfb/CMsgReader.cxx
+++ b/common/rfb/CMsgReader.cxx
@@ -221,7 +221,7 @@ void CMsgReader::readSetXCursor(int width, int height, const Point& hotspot)
rdr::U8 buf[width*height*4];
rdr::U8* out;
- if (width * height) {
+ if (width * height > 0) {
pr = is->readU8();
pg = is->readU8();
pb = is->readU8();
diff --git a/common/rfb/SMsgWriter.cxx b/common/rfb/SMsgWriter.cxx
index 2d4998b3..6ef7692e 100644
--- a/common/rfb/SMsgWriter.cxx
+++ b/common/rfb/SMsgWriter.cxx
@@ -528,7 +528,7 @@ void SMsgWriter::writeSetXCursorRect(int width, int height,
os->writeU16(width);
os->writeU16(height);
os->writeU32(pseudoEncodingXCursor);
- if (width * height) {
+ if (width * height > 0) {
os->writeU8(255);
os->writeU8(255);
os->writeU8(255);