Index: /trunk/include/cf_log.h
===================================================================
--- /trunk/include/cf_log.h	(revision 102)
+++ /trunk/include/cf_log.h	(revision 103)
@@ -14,24 +14,10 @@
 #include "cf_base.h"
 
-/**
- * 로그의 버퍼 크기를 기본 값으로 설정
- *
- * @see CF_Log_Open
- */
-#define CF_LOG_BUFFER_DEFAULT	-1
-
-/**
- * 로그 기록 시 버퍼를 사용하지 않고 즉시 기록
- *
- * @see CF_Log_Open
- */
-#define CF_LOG_BUFFER_NO		0
-
-/**
- * 로그 레벨 사용 안함
- *
- * @see CF_Log_Initialize
- */
-#define CF_LOG_NO_LEVEL			-1
+/** 로그 옵션 플래그 */
+typedef enum {
+	CF_LOG_DEFAULT_BUFFER	= -1,	/**< 기본 버퍼 크기 사용 */
+	CF_LOG_NO_BUFFER		= 0,	/**< 버퍼없이 파일에 바로 쓰기 */
+	CF_LOG_NO_LEVEL			= -1,	/**< 로그 레벨 사용 안함 */
+} E_CF_LOG_OPTION, CF_LOG_OPTION;
 
 #ifdef __cplusplus
Index: /trunk/src/cf_log.c
===================================================================
--- /trunk/src/cf_log.c	(revision 102)
+++ /trunk/src/cf_log.c	(revision 103)
@@ -389,5 +389,5 @@
  * @param ctx		로그 컨텍스트 받을 주소
  *
- * @see CF_LOG_BUFFER_DEFAULT, CF_LOG_BUFFER_NO
+ * @see CF_LOG_DEFAULT_BUFFER, CF_LOG_NO_BUFFER
  */
 static int
@@ -398,5 +398,5 @@
 	int result = 0;
 	int fileFlag = CF_FILE_CREATE|CF_FILE_WRITE|CF_FILE_APPEND;
-	int size = (memsize == CF_LOG_BUFFER_DEFAULT)
+	int size = (memsize == CF_LOG_DEFAULT_BUFFER)
 			 ? LOG_BUFFER_DEFAULT_SIZE
 			 : memsize;
@@ -579,5 +579,5 @@
  * @param memsize	로그 버퍼 크기
  *
- * @see CF_LOG_BUFFER_DEFAULT, CF_LOG_BUFFER_NO
+ * @see CF_LOG_DEFAULT_BUFFER, CF_LOG_NO_BUFFER
  */
 int
Index: /trunk/src/cf_socket.c
===================================================================
--- /trunk/src/cf_socket.c	(revision 102)
+++ /trunk/src/cf_socket.c	(revision 103)
@@ -42,9 +42,7 @@
 # define sa_family_t		unsigned short
 # define close(__sock)		closesocket(__sock)
-# define CHECK_SELECT(x)	((x) == SOCKET_ERROR)
 # define GET_SYSTEM_ERROR()	WSAGetLastError ()
 # define ERROR_INTR			WSAEINTR
 #else
-# define CHECK_SELECT(x)	((x) < 0)
 # define GET_SYSTEM_ERROR()	errno
 # define ERROR_INTR			EINTR
@@ -115,5 +113,5 @@
 	FD_SET (sock, &readfds);
 
-	while (CHECK_SELECT (result = select (sock + 1, &readfds, NULL, NULL, &tv)))
+	while ((result = select (sock + 1, &readfds, NULL, NULL, &tv)) < 0)
 	{
 		error = GET_SYSTEM_ERROR ();
Index: /trunk/test/log.c
===================================================================
--- /trunk/test/log.c	(revision 102)
+++ /trunk/test/log.c	(revision 103)
@@ -6,6 +6,4 @@
 #include <stdio.h>
 
-#define LOGID		1
-
 int main (void)
 {
@@ -13,5 +11,5 @@
 	char		logname[16] = {0x00,};
 
-	if (CF_Log_Initialize (10, 5) < 0)
+	if (CF_Log_Initialize (10, CF_LOG_NO_LEVEL) < 0)
 	{
 		fprintf (stderr, "failed to init. log\n");
@@ -22,5 +20,5 @@
 	{
 		sprintf (logname, "logid%d.txt", i);
-		if (CF_Log_Open (i, logname, CF_LOG_BUFFER_NO) < 0)
+		if (CF_Log_Open (i, logname, CF_LOG_NO_BUFFER) < 0)
 			fprintf (stderr, "failed to open log\n");
 	}
Index: /trunk/test/test.c
===================================================================
--- /trunk/test/test.c	(revision 102)
+++ /trunk/test/test.c	(revision 103)
@@ -115,5 +115,5 @@
 	{
 		sprintf (idname, "logid%d.txt", i);
-		if (CF_Log_Open (i, idname, CF_LOG_BUFFER_NO) < 0)
+		if (CF_Log_Open (i, idname, CF_LOG_NO_BUFFER) < 0)
 			fprintf (stderr, "failed to open log\n");
 	}
@@ -133,5 +133,5 @@
 
 	/* mt {{{ */
-	if (CF_Log_Open (LOG_MT, "log_mt.txt", CF_LOG_BUFFER_DEFAULT) < 0)
+	if (CF_Log_Open (LOG_MT, "log_mt.txt", CF_LOG_DEFAULT_BUFFER) < 0)
 		CF_DEBUG_PRINT (stderr, "create log ctx error\n");
 
@@ -238,5 +238,5 @@
 	CF_Log_Write (LOG_SOCKET, "SERVER", "accepted\n");
 
-	for (i = 0 ; i < 10 ; i++)
+	for (i = 0 ; i < 5 ; i++)
 	{
 		if ((recvd = CF_Socket_Recv (clntsock, buf, sizeof (buf))) < 0)
@@ -280,5 +280,5 @@
 	CF_Log_Write (LOG_SOCKET, "CLIENT", "connected\n");
 
-	for (i = 0 ; i < 10 ; i++)
+	for (i = 0 ; i < 5 ; i++)
 	{
 		if (CF_Socket_Send (sock, buf, sizeof (buf)) < 0)
@@ -316,5 +316,5 @@
 
 	/*------------------------------------------------------------*/
-	if (CF_Log_Initialize (1) < 0)
+	if (CF_Log_Initialize (1, CF_LOG_NO_LEVEL) < 0)
 	{
 		fprintf (stderr, "failed to init. log\n");
@@ -322,5 +322,5 @@
 	}
 
-	if (CF_Log_Open (LOG_SOCKET, "socket.txt", CF_LOG_BUFFER_DEFAULT) < 0)
+	if (CF_Log_Open (LOG_SOCKET, "socket.txt", CF_LOG_DEFAULT_BUFFER) < 0)
 		CF_DEBUG_PRINT (stderr, "failed to open log\n");
 
