~brianaker/libmemcached/1164440

« back to all changes in this revision

Viewing changes to clients/memslap.cc

  • Committer: Continuous Integration
  • Date: 2013-03-10 13:02:02 UTC
  • mfrom: (1149.1.7 libmemcached-1.0)
  • Revision ID: ci@tangent.org-20130310130202-pbwutqnl3aolmc53
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-235

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <mem_config.h>
40
40
 
41
41
#include <cassert>
 
42
#include <cerrno>
42
43
#include <cstdio>
43
44
#include <cstdlib>
44
45
#include <cstring>
50
51
#include <sys/stat.h>
51
52
#include <sys/time.h>
52
53
#include <sys/types.h>
53
 
#include <sys/types.h>
54
54
#include <unistd.h>
55
55
 
56
56
#include <iostream>
468
468
      break;
469
469
 
470
470
    case OPT_SLAP_CONCURRENCY:
 
471
      errno= 0;
471
472
      opt_concurrency= (unsigned int)strtoul(optarg, (char **)NULL, 10);
 
473
      if (errno != 0)
 
474
      {
 
475
        fprintf(stderr, "Invalid value for concurrency: %s\n", optarg);
 
476
        exit(EXIT_FAILURE);
 
477
      }
472
478
      break;
473
479
 
474
480
    case OPT_SLAP_EXECUTE_NUMBER:
 
481
      errno= 0;
475
482
      opt_execute_number= (unsigned int)strtoul(optarg, (char **)NULL, 10);
 
483
      if (errno != 0)
 
484
      {
 
485
        fprintf(stderr, "Invalid value for execute: %s\n", optarg);
 
486
        exit(EXIT_FAILURE);
 
487
      }
476
488
      break;
477
489
 
478
490
    case OPT_SLAP_INITIAL_LOAD:
 
491
      errno= 0;
479
492
      opt_createial_load= (unsigned int)strtoul(optarg, (char **)NULL, 10);
 
493
      if (errno != 0)
 
494
      {
 
495
        fprintf(stderr, "Invalid value for initial load: %s\n", optarg);
 
496
        exit(EXIT_FAILURE);
 
497
      }
480
498
      break;
481
499
 
482
500
    case OPT_QUIET: