* \param netmask Value of the netmask part in \a cidr or the
* default of 32 if not specified.
*
- * \return Pointer to \a addr if succesful, NULL on error.
+ * \return Pointer to \a addr if successful, NULL on error.
* \sa RFC 4632
*/
char *parse_cidr(const char *cidr,
struct servent *se = getservbyport(htons(port), transport);
if (se == NULL)
- snprintf(service, sizeof(service), "%u", port);
+ snprintf(service, sizeof(service), "%d", port);
else
snprintf(service, sizeof(service), "%s", se->s_name);
}
*
* \param sockfd The socket file descriptor.
*
- * The socket must be connected. See RFC 1122, 3.3.3. If the protocol familiy
+ * The socket must be connected. See RFC 1122, 3.3.3. If the protocol family
* could not be determined, \p AF_INET is assumed.
*
* \return The maximum message size of the address family type.