AnsweredAssumed Answered

htons problem with K60?  MQX bug?

Question asked by JOHN ADAMSON on Sep 12, 2011
Latest reply on Jul 12, 2013 by David Nomiddlename Wu
The code htons(&server_address.sin_port, 10000); appears to work on the M52259EVB, but not on the TWR-K60. Both running MQX 3.7 & CW10.1. If I change the code to simply server_address.sin_port = 10000; on the K60, it seems to work. Is this an MQX bug or stupid user error? I'd have thought that if it's the latter, it would have been broken for both processors. The whole point is that it should do the same thing regardless of the endian of the processor, right? John