removing strndups

This commit is contained in:
Alex Shinn 2009-11-11 01:43:47 +09:00
parent edd08d6740
commit 6db4ed9155
2 changed files with 2 additions and 3 deletions

3
eval.c
View file

@ -2252,8 +2252,7 @@ sexp sexp_make_opcode (sexp ctx, sexp name, sexp op_class, sexp code,
sexp_opcode_data(res) = data;
sexp_opcode_data2(res) = data2;
sexp_opcode_func(res) = func;
sexp_opcode_name(res)
= strndup(sexp_string_data(name), sexp_string_length(name)+1);
sexp_opcode_name(res) = strdup(sexp_string_data(name));
}
return res;
}

2
sexp.c
View file

@ -135,7 +135,7 @@ sexp sexp_register_type (sexp ctx, sexp name, sexp fb, sexp flb, sexp flo, sexp
sexp_type_size_base(type) = sexp_unbox_fixnum(sb);
sexp_type_size_off(type) = sexp_unbox_fixnum(so);
sexp_type_size_scale(type) = sexp_unbox_fixnum(sc);
sexp_type_name(type) = strndup(sexp_string_data(name), sexp_string_length(name)+1);
sexp_type_name(type) = strdup(sexp_string_data(name));
res = sexp_make_fixnum(sexp_type_tag(type));
}
return res;