projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
c++: fix -Wenum-in-bool-context
[awesomized/libmemcached]
/
clients
/
memerror.cc
diff --git
a/clients/memerror.cc
b/clients/memerror.cc
index 17bc531c96473ed735fb214ae19c1c2ca76c2ac1..3cee64cce518aaf3b6ca19bb64ac0b399ad6bd55 100644
(file)
--- a/
clients/memerror.cc
+++ b/
clients/memerror.cc
@@
-1,4
+1,5
@@
/* LibMemcached
/* LibMemcached
+ * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
* Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
* Copyright (C) 2006-2009 Brian Aker
* All rights reserved.
*
@@
-8,7
+9,7
@@
* Summary:
*
*/
* Summary:
*
*/
-#include "config.h"
+#include "
mem_
config.h"
#include <cerrno>
#include <cstdio>
#include <cerrno>
#include <cstdio>
@@
-20,7
+21,7
@@
#include <iostream>
#include <unistd.h>
#include <iostream>
#include <unistd.h>
-#include <libmemcached/memcached.h>
+#include <libmemcached
-1.0
/memcached.h>
#include "utilities.h"
#include "utilities.h"
@@
-46,7
+47,8
@@
int main(int argc, char *argv[])
char *nptr;
unsigned long value= strtoul(argv[optind], &nptr, 10);
char *nptr;
unsigned long value= strtoul(argv[optind], &nptr, 10);
- if ((nptr == argv[optind] and value == 0) or
+ if ((errno != 0) or
+ (nptr == argv[optind] and value == 0) or
(value == ULONG_MAX and errno == ERANGE) or
(value == 0 and errno == EINVAL))
{
(value == ULONG_MAX and errno == ERANGE) or
(value == 0 and errno == EINVAL))
{