Przeglądaj źródła

Fix a compiler warning

"signed and unsigned type in conditional expression"
Richard Laager 15 lat temu
rodzic
commit
b55e615a5c
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/docsis_yy.y

+ 4 - 1
src/docsis_yy.y

@@ -559,7 +559,10 @@ unsigned int tlvtreelen (struct tlv *tlv)
    if (tlv == NULL) return 0;
 
    for (tlvptr=tlv; tlvptr; tlvptr=tlvptr->next_sibling)  {
-        current_size += tlvptr->first_child ? 2+tlvtreelen(tlvptr->first_child) : 2+tlvptr->tlv_len;
+        if (tlvptr->first_child)
+            current_size += 2+tlvtreelen(tlvptr->first_child);
+        else
+            current_size += 2+tlvptr->tlv_len;
    }
    return current_size;
 }