~brianaker/libmemcached/gear-clean

« back to all changes in this revision

Viewing changes to clients/memerror.cc

  • Committer: Brian Aker
  • Date: 2012-09-24 01:36:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1072.
  • Revision ID: brian@tangent.org-20120924013601-4f0zeykol10ka6so
Updates from ddm4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* LibMemcached
2
 
 * Copyright (C) 2011-2012 Data Differential, http://datadifferential.com/
3
2
 * Copyright (C) 2006-2009 Brian Aker
4
3
 * All rights reserved.
5
4
 *
9
8
 * Summary:
10
9
 *
11
10
 */
12
 
#include "mem_config.h"
 
11
#include "config.h"
13
12
 
14
13
#include <cerrno>
15
14
#include <cstdio>
21
20
#include <iostream>
22
21
#include <unistd.h>
23
22
 
24
 
#include <libmemcached-1.0/memcached.h>
 
23
#include <libmemcached/memcached.h>
25
24
 
26
25
#include "utilities.h"
27
26
 
47
46
    char *nptr;
48
47
    unsigned long value= strtoul(argv[optind], &nptr, 10);
49
48
 
50
 
    if ((errno != 0) or
51
 
        (nptr == argv[optind] and value == 0) or
 
49
    if ((nptr == argv[optind] and value == 0) or
52
50
        (value == ULONG_MAX and errno == ERANGE) or
53
51
        (value == 0 and errno == EINVAL))
54
52
    {