projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
tests: fix udp tests
[awesomized/libmemcached]
/
clients
/
ms_setting.c
diff --git
a/clients/ms_setting.c
b/clients/ms_setting.c
index d7099709490d0edba7f55b7965082982ba129601..eafe459a523059b1c819921d94e75ab511e8a4c2 100644
(file)
--- a/
clients/ms_setting.c
+++ b/
clients/ms_setting.c
@@
-9,7
+9,7
@@
*
*/
*
*/
-#include "config.h"
+#include "
mem_
config.h"
#include <libmemcached/memcached.h>
#include <libmemcached/memcached.h>
@@
-195,7
+195,7
@@
static void ms_get_serverlist(char *str)
/**
* used to get the CPU count of the current system
*
/**
* used to get the CPU count of the current system
*
- * @return return the cpu count if get, else return
1
+ * @return return the cpu count if get, else return
EXIT_FAILURE
*/
static uint32_t ms_get_cpu_count()
{
*/
static uint32_t ms_get_cpu_count()
{
@@
-223,7
+223,7
@@
static uint32_t ms_get_cpu_count()
#endif
/* the system with one cpu at least */
#endif
/* the system with one cpu at least */
- return
1
;
+ return
EXIT_FAILURE
;
} /* ms_get_cpu_count */
} /* ms_get_cpu_count */
@@
-262,7
+262,7
@@
ms_conf_type_t ms_get_conf_type(char *line)
*
* @param line, string of one line
*
*
* @param line, string of one line
*
- * @return if success, return
1, else return 0
+ * @return if success, return
EXIT_FAILURE, else return EXIT_SUCCESS
*/
static int ms_is_line_data(char *line)
{
*/
static int ms_is_line_data(char *line)
{
@@
-275,9
+275,9
@@
static int ms_is_line_data(char *line)
begin_ptr++;
}
if ((begin_ptr[0] == '\0') || (begin_ptr[0] == '#'))
begin_ptr++;
}
if ((begin_ptr[0] == '\0') || (begin_ptr[0] == '#'))
- return
0
;
+ return
EXIT_SUCCESS
;
- return
1
;
+ return
EXIT_FAILURE
;
} /* ms_is_line_data */
} /* ms_is_line_data */
@@
-287,14
+287,14
@@
static int ms_is_line_data(char *line)
* @param line, string of one line
* @param nread, length of the line
*
* @param line, string of one line
* @param nread, length of the line
*
- * @return if it's EOF or not line data, return
0, else return 1
+ * @return if it's EOF or not line data, return
EXIT_SUCCESS, else return EXIT_FAILURE
*/
static int ms_read_is_data(char *line, ssize_t nread)
{
if ((nread == EOF) || ! ms_is_line_data(line))
*/
static int ms_read_is_data(char *line, ssize_t nread)
{
if ((nread == EOF) || ! ms_is_line_data(line))
- return
0
;
+ return
EXIT_SUCCESS
;
- return
1
;
+ return
EXIT_FAILURE
;
} /* ms_read_is_data */
} /* ms_read_is_data */
@@
-575,7
+575,7
@@
static void ms_calc_avg_size()
* @param distr, pointer of distribution structure array
* @param length, length of the array
*
* @param distr, pointer of distribution structure array
* @param length, length of the array
*
- * @return always return
0
+ * @return always return
EXIT_SUCCESS
*/
static int ms_shuffle_distr(ms_distr_t *distr, int length)
{
*/
static int ms_shuffle_distr(ms_distr_t *distr, int length)
{
@@
-614,7
+614,7
@@
static int ms_shuffle_distr(ms_distr_t *distr, int length)
} /* switch */
}
} /* switch */
}
- return
0
;
+ return
EXIT_SUCCESS
;
} /* ms_shuffle_distr */
} /* ms_shuffle_distr */
@@
-683,7
+683,7
@@
static void ms_build_distr()
exit(1);
}
exit(1);
}
- if (! ms_setting.binary_prot
+ if (! ms_setting.binary_prot
_
&& ((start_len > MAX_KEY_SIZE) || (end_len > MAX_KEY_SIZE)))
{
fprintf(stderr, "key length must be less than 250 bytes.\n");
&& ((start_len > MAX_KEY_SIZE) || (end_len > MAX_KEY_SIZE)))
{
fprintf(stderr, "key length must be less than 250 bytes.\n");
@@
-880,7
+880,7
@@
static void ms_setting_slapmode_init_pre()
ms_setting.reconnect= false;
ms_setting.verbose= false;
ms_setting.facebook_test= false;
ms_setting.reconnect= false;
ms_setting.verbose= false;
ms_setting.facebook_test= false;
- ms_setting.binary_prot= false;
+ ms_setting.binary_prot
_
= false;
ms_setting.stat_freq= 0;
ms_setting.srv_str= NULL;
ms_setting.cfg_file= NULL;
ms_setting.stat_freq= 0;
ms_setting.srv_str= NULL;
ms_setting.cfg_file= NULL;