Coverity fixes for API socket 66/8666/2
authorChris Luke <chrisy@flirble.org>
Wed, 4 Oct 2017 17:59:14 +0000 (13:59 -0400)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 6 Oct 2017 23:02:47 +0000 (23:02 +0000)
commite9aebf9db548b940c77f7c5826a1260d1931e75d
tree2173932a2e69d4a4b2819ed1471f52e964a51204
parentf7f809c298104dc3026106fb498f474d5d8720cc
Coverity fixes for API socket

- Coverity whines about a zero-length field not being initialized.
  Change the struct setup to an initializer which will implicitly zero
  all unused fields, and add the coverity notation that should stop
  it whining. One or both of these should shut it up!
- Fix some incorrect use of ntohl that was tainting values; in these
  cases htonl should have been used, and avoid a double-swap.

Change-Id: I00493a77eb23a0b8feb647165ee349e1e9d5cfdb
Signed-off-by: Chris Luke <chrisy@flirble.org>
src/vlibapi/vat_helper_macros.h
src/vlibmemory/socket_client.c