You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/03/30 15:42:51 UTC

[GitHub] [incubator-nuttx-apps] Ouss4 commented on a change in pull request #152: examples/tcpblaster: When a host PC is used, take its implementation of hton/ntoh functions.

Ouss4 commented on a change in pull request #152: examples/tcpblaster: When a host PC is used, take its implementation of hton/ntoh functions.
URL: https://github.com/apache/incubator-nuttx-apps/pull/152#discussion_r400294932
 
 

 ##########
 File path: examples/tcpblaster/tcpblaster.h
 ##########
 @@ -52,33 +52,17 @@
  ****************************************************************************/
 
 #ifdef TCPBLASTER_HOST
-#undef HTONS
-#ifdef CONFIG_ENDIAN_BIG
-#  define HTONS(ns) (ns)
-#else
-#  define HTONS(ns) \
-     (unsigned short) \
-       (((((unsigned short)(ns)) & 0x00ff) << 8) | \
-        ((((unsigned short)(ns)) >> 8) & 0x00ff))
-#endif
-
-#undef HTONL
-#ifdef CONFIG_ENDIAN_BIG
-#  define HTONL(nl) (nl)
-#else
-#  define HTONL(nl) \
-     (unsigned long) \
-       (((((unsigned long)(nl)) & 0x000000ffUL) << 24) | \
-        ((((unsigned long)(nl)) & 0x0000ff00UL) <<  8) | \
-        ((((unsigned long)(nl)) & 0x00ff0000UL) >>  8) | \
-        ((((unsigned long)(nl)) & 0xff000000UL) >> 24))
-#endif
+/* HTONS/L macros are unique to uIP */
 
 Review comment:
   I copied it from the UDP one.
   Fixed now.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services