#include <errno.h>
#include <strings.h>
#include <string.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <limits.h>
+
#include <libmemcached/memcached.h>
/* Check for various possible errors */
- if ((errno == ERANGE && (val == INTMAX_MAX || val == INTMAX_MIN))
+ if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN))
|| (errno != 0 && val == 0))
{
*error= true;
- return 0;
+ return EXIT_SUCCESS;
}
if (endptr == nptr)
{
*error= true;
- return 0;
+ return EXIT_SUCCESS;
}
*error= false;
int return_code= 0;
options_parse(argc, argv);
+ initialize_sockets();
memc= memcached_create(NULL);
process_hash_option(memc, opt_hash);
if (!initialize_sasl(memc, opt_username, opt_passwd))
{
memcached_free(memc);
- return 1;
+ return EXIT_FAILURE;
}
while (optind < argc)