Skip to content

Commit

Permalink
Remove useless assert, fbuffer_alloc cares already
Browse files Browse the repository at this point in the history
  • Loading branch information
flori committed Feb 4, 2013
1 parent 0eab401 commit de0f736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions ext/json/ext/fbuffer/fbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

Expand Down
1 change: 0 additions & 1 deletion ext/json/ext/generator/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define _GENERATOR_H_

#include <string.h>
#include <assert.h>
#include <math.h>
#include <ctype.h>

Expand Down

0 comments on commit de0f736

Please sign in to comment.