Browse Source

cmMidiPort.c: Use 0xff as invalid status byte instead of -1 in cmMpParseMidiData()

and cmMpParserMidiTriple() to eliminate 'always true' warning.
master
kevin 11 years ago
parent
commit
267fa650a5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cmMidiPort.c

+ 2
- 2
cmMidiPort.c View File

@@ -352,7 +352,7 @@ cmMpRC_t  cmMpParserMidiTriple(   cmMpParserH_t h, unsigned deltaMicroSecs, cmMi
352 352
 {
353 353
   cmMpRC_t rc = kOkMpRC;
354 354
   cmMpParser_t* p = _cmMpParserFromHandle(h);
355
-  cmMidiByte_t mb = -1;
355
+  cmMidiByte_t mb = 0xff; // a midi triple may never have a status of 0xff
356 356
 
357 357
   if( d0 == 0xff )
358 358
     p->dataCnt = 0;
@@ -384,7 +384,7 @@ cmMpRC_t  cmMpParserMidiTriple(   cmMpParserH_t h, unsigned deltaMicroSecs, cmMi
384 384
       break;
385 385
   }
386 386
 
387
-  if( mb != -1 )
387
+  if( mb != 0xff )
388 388
     _cmMpParserStoreChMsg(p,deltaMicroSecs,mb);
389 389
   
390 390
   p->dataCnt = cmInvalidCnt;

Loading…
Cancel
Save