On 04/01/16 12:55, Daniel Gutson wrote:
>
>> +
>> + if ( (hostnamelen > 0) && (hostnamelen < 256) )
Avoid magic numbers. Should this be MAXHOSTNAMELEN, and in any case ot
has been already limited before in the call to gethosname turning the
check unnecessary? (Don't believe me, please verify).
I think this should be UINT8_MAX, since it is later stored as an uint8_t.
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel