cleaned up code a bit
This commit is contained in:
parent
25b71a4800
commit
de534fed83
@ -435,6 +435,7 @@ pkglib_LTLIBRARIES = libhcl.la $(am__append_3)
|
||||
libhcl_la_SOURCES = \
|
||||
hcl-prv.h \
|
||||
logfmtv.h \
|
||||
sa-utl.h \
|
||||
bigint.c \
|
||||
comp.c \
|
||||
debug.c \
|
||||
|
@ -83,10 +83,8 @@
|
||||
# include <sys/mman.h>
|
||||
# endif
|
||||
|
||||
# include <errno.h>
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/socket.h>
|
||||
# include <netinet/in.h>
|
||||
@ -1792,8 +1790,7 @@ static void set_err_with_syserr (hcl_server_t* server, int syserr, const char* b
|
||||
int hcl_server_start (hcl_server_t* server, const hcl_bch_t* addrs)
|
||||
{
|
||||
sockaddr_t srv_addr;
|
||||
int srv_fd, sck_fam;
|
||||
int optval;
|
||||
int srv_fd, sck_fam, optval;
|
||||
socklen_t srv_len;
|
||||
pthread_attr_t thr_attr;
|
||||
|
||||
|
14
lib/main2.c
14
lib/main2.c
@ -31,11 +31,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#if defined(HAVE_TIME_H)
|
||||
# include <time.h>
|
||||
@ -46,19 +43,10 @@
|
||||
#if defined(HAVE_SIGNAL_H)
|
||||
# include <signal.h>
|
||||
#endif
|
||||
#if defined(HAVE_SYS_MMAN_H)
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
/* ========================================================================= */
|
||||
|
||||
typedef struct server_xtn_t server_xtn_t;
|
||||
@ -215,7 +203,7 @@ static void log_write (hcl_server_t* server, int wid, unsigned int mask, const h
|
||||
* write what have been converted this round. */
|
||||
|
||||
/*HCL_ASSERT (hcl, ucslen > 0); */ /* if this fails, the buffer size must be increased */
|
||||
assert (ucslen > 0);
|
||||
/*assert (ucslen > 0);*/
|
||||
|
||||
/* attempt to write all converted characters */
|
||||
if (write_all(logfd, buf, bcslen) <= -1) break;
|
||||
|
Loading…
Reference in New Issue
Block a user