--- embedaddon/libnet/src/libnet_port_list.c 2013/07/22 11:54:42 1.1.1.2 +++ embedaddon/libnet/src/libnet_port_list.c 2023/09/27 11:11:38 1.1.1.3 @@ -1,5 +1,5 @@ /* - * $Id: libnet_port_list.c,v 1.1.1.2 2013/07/22 11:54:42 misho Exp $ + * $Id: libnet_port_list.c,v 1.1.1.3 2023/09/27 11:11:38 misho Exp $ * * libnet * libnet_port_list.c - transport layer port list chaining code @@ -30,14 +30,7 @@ * */ -#if (HAVE_CONFIG_H) -#include "../include/config.h" -#endif -#if (!(_WIN32) || (__CYGWIN__)) -#include "../include/libnet.h" -#else -#include "../include/win32/libnet.h" -#endif +#include "common.h" uint16_t *all_lists; @@ -77,7 +70,7 @@ libnet_plist_chain_new(libnet_t *l, libnet_plist_t **p if (!valid_token) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "libnet_build_plist_chain: illegal token # %d (%c)\n", + "libnet_build_plist_chain: illegal token # %d (%c)", i + 1, token_list[i]); *plist = NULL; @@ -91,7 +84,7 @@ libnet_plist_chain_new(libnet_t *l, libnet_plist_t **p if (!(*plist)) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "libnet_build_plist_chain: malloc %s\n", strerror(errno)); + "libnet_build_plist_chain: malloc %s", strerror(errno)); *plist = NULL; return (-1); } @@ -106,7 +99,7 @@ libnet_plist_chain_new(libnet_t *l, libnet_plist_t **p { all_lists = all_lists_tmp; snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "libnet_build_plist_chain: realloc %s\n", strerror(errno)); + "libnet_build_plist_chain: realloc %s", strerror(errno)); *plist = NULL; return(-1); } @@ -130,7 +123,7 @@ libnet_plist_chain_new(libnet_t *l, libnet_plist_t **p if (!tmp->next) { snprintf(l->err_buf, LIBNET_ERRBUF_SIZE, - "libnet_build_plist_chain: malloc %s\n", strerror(errno)); + "libnet_build_plist_chain: malloc %s", strerror(errno)); /* * XXX - potential memory leak if other nodes are allocated * but not freed. @@ -292,4 +285,9 @@ libnet_plist_chain_free(libnet_plist_t *plist) return (1); } -/* EOF */ +/** + * Local Variables: + * indent-tabs-mode: nil + * c-file-style: "stroustrup" + * End: + */