projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
libmemcached: fix #53 with supplied patch
[awesomized/libmemcached]
/
clients
/
memcp.cc
diff --git
a/clients/memcp.cc
b/clients/memcp.cc
index 6c6d1e96fe6142bdac3186445787b3df720c9a49..d87e0cad0cb4bc1486ab60b9ef23a9f9b4f1bdc8 100644
(file)
--- a/
clients/memcp.cc
+++ b/
clients/memcp.cc
@@
-68,13
+68,13
@@
static long strtol_wrapper(const char *nptr, int base, bool *error)
or (errno != 0 && val == 0))
{
*error= true;
or (errno != 0 && val == 0))
{
*error= true;
- return
EXIT_SUCCESS
;
+ return
0
;
}
if (endptr == nptr)
{
*error= true;
}
if (endptr == nptr)
{
*error= true;
- return
EXIT_SUCCESS
;
+ return
0
;
}
*error= false;
}
*error= false;
@@
-184,11
+184,8
@@
int main(int argc, char *argv[])
int fd= open(argv[optind], O_RDONLY);
if (fd < 0)
{
int fd= open(argv[optind], O_RDONLY);
if (fd < 0)
{
- if (opt_verbose)
- {
- std::cerr << "memcp " << argv[optind] << " " << strerror(errno) << std::endl;
- optind++;
- }
+ std::cerr << "memcp " << argv[optind] << " " << strerror(errno) << std::endl;
+ optind++;
exit_code= EXIT_FAILURE;
continue;
}
exit_code= EXIT_FAILURE;
continue;
}
@@
-385,10
+382,10
@@
static void options_parse(int argc, char *argv[])
case OPT_EXPIRE: /* --expire */
{
bool strtol_error;
case OPT_EXPIRE: /* --expire */
{
bool strtol_error;
- opt_expires= (time_t)strtol_wrapper(optarg, 1
6
, &strtol_error);
+ opt_expires= (time_t)strtol_wrapper(optarg, 1
0
, &strtol_error);
if (strtol_error == true)
{
if (strtol_error == true)
{
- fprintf(stderr, "Bad value passed via --
flag
\n");
+ fprintf(stderr, "Bad value passed via --
expire
\n");
exit(1);
}
}
exit(1);
}
}