projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Just move the version forward.
[awesomized/libmemcached]
/
clients
/
memrm.cc
diff --git
a/clients/memrm.cc
b/clients/memrm.cc
index a559ef90dfcef80f1bd7cb8da62aefb5f332a257..4e4cd479e3f79599e04eec240dfe05734831ab08 100644
(file)
--- a/
clients/memrm.cc
+++ b/
clients/memrm.cc
@@
-11,6
+11,7
@@
*/
#include "mem_config.h"
*/
#include "mem_config.h"
+#include <cerrno>
#include <cstdio>
#include <cstring>
#include <getopt.h>
#include <cstdio>
#include <cstring>
#include <getopt.h>
@@
-204,7
+205,13
@@
static void options_parse(int argc, char *argv[])
break;
case OPT_EXPIRE: /* --expire */
break;
case OPT_EXPIRE: /* --expire */
+ errno= 0;
opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10);
opt_expire= (time_t)strtoll(optarg, (char **)NULL, 10);
+ if (errno != 0)
+ {
+ std::cerr << "Incorrect value passed to --expire: `" << optarg << "`" << std::cerr;
+ exit(EXIT_FAILURE);
+ }
break;
case OPT_HASH:
break;
case OPT_HASH: