Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Dec 15, 2014
1 parent 6737117 commit f13a69f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/lib/value.c
Expand Up @@ -1036,12 +1036,8 @@ ssize_t value_data_cast(TALLOC_CTX *ctx, value_data_t *dst,
* Converts the src data to octets with no processing.
*/
if (dst_type == PW_TYPE_OCTETS) {
if (src_type == PW_TYPE_STRING) {
dst->octets = talloc_memdup(ctx, src->strvalue, src_len);
} else {
value_data_hton(dst, src_type, src, src_len);
dst->octets = talloc_memdup(ctx, dst, src_len);
}
value_data_hton(dst, src_type, src, src_len);
dst->octets = talloc_memdup(ctx, dst, src_len);
talloc_set_type(dst->octets, uint8_t);
return talloc_array_length(dst->strvalue);
}
Expand Down

0 comments on commit f13a69f

Please sign in to comment.