~piotr-sikora/libmemcached/fix-tests-on-openbsd

« back to all changes in this revision

Viewing changes to libmemcached/stats.c

  • Committer: Brian Aker
  • Date: 2011-03-08 23:17:05 UTC
  • Revision ID: brian@tangent.org-20110308231705-l80szfpjsrdnt3dc
Merge in solution for lp:581030.

Show diffs side-by-side

added added

removed removed

Lines of Context:
405
405
  memcached_return_t rc;
406
406
  memcached_stat_st *stats;
407
407
 
 
408
  if (! ptr)
 
409
  {
 
410
    WATCHPOINT_ASSERT(memc_ptr);
 
411
    return NULL;
 
412
  }
 
413
 
 
414
  WATCHPOINT_ASSERT(error);
 
415
 
 
416
 
408
417
  unlikely (ptr->flags.use_udp)
409
418
  {
410
 
    *error= MEMCACHED_NOT_SUPPORTED;
 
419
    if (error)
 
420
      *error= MEMCACHED_NOT_SUPPORTED;
 
421
 
411
422
    return NULL;
412
423
  }
413
424
 
415
426
 
416
427
  if (! stats)
417
428
  {
418
 
    *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
 
429
    if (error)
 
430
      *error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
 
431
 
419
432
    return NULL;
420
433
  }
421
434
 
445
458
      rc= MEMCACHED_SOME_ERRORS;
446
459
  }
447
460
 
448
 
  *error= rc;
 
461
  if (error)
 
462
    *error= rc;
 
463
 
449
464
  return stats;
450
465
}
451
466