Procházet zdrojové kódy

C90 compatibility, and removed unnecessary index==0 test

Jens Alfke před 11 roky
rodič
revize
0ce7712ac1
1 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 3 2
      mnemonic.c

+ 3 - 2
mnemonic.c

@@ -447,14 +447,15 @@ mn_decode (char *src, void *dest, int destsize)
 {
   mn_index index;
   int offset = 0;
+  int status;
 
   while ((index = mn_next_word_index (&src)) != 0)
     {
       (void) mn_decode_word_index (index, dest, destsize, &offset);
     }
-  if (index == 0 && *src != 0)
+  if (*src != 0)
     return MN_EWORD;
-  int status = mn_decode_word_index (MN_EOF, dest, destsize, &offset);
+  status = mn_decode_word_index (MN_EOF, dest, destsize, &offset);
   if (status < 0)
     return status;
   return offset;