]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/xyzModem.c
Revert "fdt: fix address cell count checking in fdt_translate_address()"
[people/ms/u-boot.git] / common / xyzModem.c
index 39f7d17a7c7dd9baa34125f488296e2ccc51c902..5656aac48fb1b688a10247adf572444392779194 100644 (file)
@@ -446,7 +446,7 @@ xyzModem_get_hdr (void)
   /* Verify checksum/CRC */
   if (xyz.crc_mode)
     {
-      cksum = cyg_crc16 (xyz.pkt, xyz.len);
+      cksum = crc16_ccitt(0, xyz.pkt, xyz.len);
       if (cksum != ((xyz.crc1 << 8) | xyz.crc2))
        {
          ZM_DEBUG (zm_dprintf ("CRC error - recvd: %02x%02x, computed: %x\n",
@@ -759,7 +759,8 @@ xyzModem_stream_terminate (bool abort, int (*getc) (void))
        * If we don't eat it now, RedBoot will think the user typed it.
        */
       ZM_DEBUG (zm_dprintf ("Trailing gunk:\n"));
-      while ((c = (*getc) ()) > -1);
+      while ((c = (*getc) ()) > -1)
+        ;
       ZM_DEBUG (zm_dprintf ("\n"));
       /*
        * Make a small delay to give terminal programs like minicom