libc/net: Fix some issues in our inet6_opt_init() (from RFC 3542).
authorSascha Wildner <saw@online.de>
Thu, 30 Jan 2014 14:23:52 +0000 (15:23 +0100)
committerSascha Wildner <saw@online.de>
Thu, 30 Jan 2014 14:23:52 +0000 (15:23 +0100)
commit98651c6e0e1c3b7a6b8650b55b473fcc745a22b7
treec306ddacc4f82a94a1a18e04dbfde133a1be9f35
parent5764e12516158974fac10d50dbd2df76ce1ab007
libc/net: Fix some issues in our inet6_opt_init() (from RFC 3542).

* The RFC says (in section 10.1) that only when extbuf is not NULL,
  extlen shall be checked, so don't perform this check when NULL is
  passed.

* socklen_t is unsigned, so checking extlen for less than zero is
  not needed.
lib/libc/net/ip6opt.c