]> source.dussan.org Git - tigervnc.git/commitdiff
Fix "int-in-bool-context" compile errors
authorBrian P. Hinz <bphinz@users.sf.net>
Thu, 16 Nov 2017 22:46:15 +0000 (17:46 -0500)
committerBrian P. Hinz <bphinz@users.sf.net>
Thu, 16 Nov 2017 22:50:49 +0000 (17:50 -0500)
common/rfb/CMsgReader.cxx
common/rfb/SMsgWriter.cxx

index c325d48fcc6f1c67fc8fc6edeaaeb07539f99b57..0271936ed8e6c34e99d206af3ec49a103750b324 100644 (file)
@@ -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();
index 2d4998b35b835f3f5fdcf03ddb805667ef47089e..6ef7692eeb4c2805a8aa83772b7806621c2b53ab 100644 (file)
@@ -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);