Simple fix in stats.
[awesomized/libmemcached] / libmemcached / memcached_stats.c
index cf3adc12dfc6e2ff296248ba52cd665309b56490..2223672ff4ac8ab6483c255d2cea01fdc969a4d4 100644 (file)
@@ -84,6 +84,14 @@ static void set_data(memcached_stat_st *stat, char *key, char *value)
   {
     stat->total_items= strtol(value, (char **)NULL, 10);
   }
+  else if (!strcmp("bytes_read", key))
+  {
+    stat->bytes_read= strtoll(value, (char **)NULL, 10);
+  }
+  else if (!strcmp("bytes_written", key))
+  {
+    stat->bytes_written= strtoll(value, (char **)NULL, 10);
+  }
   else if (!strcmp("bytes", key))
   {
     stat->bytes= strtoll(value, (char **)NULL, 10);
@@ -120,14 +128,6 @@ static void set_data(memcached_stat_st *stat, char *key, char *value)
   {
     stat->evictions= (uint64_t)strtoll(value, (char **)NULL, 10);
   }
-  else if (!strcmp("bytes_read", key))
-  {
-    stat->bytes_read= strtoll(value, (char **)NULL, 10);
-  }
-  else if (!strcmp("bytes_written", key))
-  {
-    stat->bytes_written= strtoll(value, (char **)NULL, 10);
-  }
   else if (!strcmp("limit_maxbytes", key))
   {
     stat->limit_maxbytes= strtoll(value, (char **)NULL, 10);