There is another version of mkaddr.c subroutine which is using inet_addr. The problem with inet_addr(3) is that it returns the value INADDR_NONE when an address is invalid. When the IP address 255.255.255.255 is converted to a 32-bit value, its return value is identical to the constant INADDR_NONE.
Consequently, it becomes impossible to distinguish between a bad input IP address, and the general broadcast address. Use ofthe inet_aton(3) function avoids this ambiguity.