summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2013-02-04 21:46:43 +0100
committerFlorian Frank <flori@ping.de>2013-02-04 22:08:20 +0100
commitde0f73688acc7936b7b00aa7e4064c7307a7797a (patch)
treeef89843b146ba63d5df2d709998321c11b236649
parent0eab40109d93163e614fd434d9fb419bd21db02f (diff)
downloadjson-de0f73688acc7936b7b00aa7e4064c7307a7797a.tar.gz
Remove useless assert, fbuffer_alloc cares already
-rw-r--r--ext/json/ext/fbuffer/fbuffer.h8
-rw-r--r--ext/json/ext/generator/generator.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h
index b5e47ee..af74187 100644
--- a/ext/json/ext/fbuffer/fbuffer.h
+++ b/ext/json/ext/fbuffer/fbuffer.h
@@ -3,7 +3,6 @@
#define _FBUFFER_H_
#include "ruby.h"
-#include <assert.h>
#ifndef RHASH_SIZE
#define RHASH_SIZE(hsh) (RHASH(hsh)->tbl->num_entries)
@@ -166,11 +165,8 @@ static FBuffer *fbuffer_dup(FBuffer *fb)
unsigned long len = fb->len;
FBuffer *result;
- assert(len > 0);
- if (len > 0) {
- result = fbuffer_alloc(len);
- fbuffer_append(result, FBUFFER_PAIR(fb));
- }
+ result = fbuffer_alloc(len);
+ fbuffer_append(result, FBUFFER_PAIR(fb));
return result;
}
diff --git a/ext/json/ext/generator/generator.h b/ext/json/ext/generator/generator.h
index 1b7074c..b58cc4b 100644
--- a/ext/json/ext/generator/generator.h
+++ b/ext/json/ext/generator/generator.h
@@ -2,7 +2,6 @@
#define _GENERATOR_H_
#include <string.h>
-#include <assert.h>
#include <math.h>
#include <ctype.h>