#include "cmd_rand_libc.h" void *cmd_rand_libc(void *data) { char *ret = NULL; int fret=-1; const int buf_size = 128; char buf[buf_size+1]; printf("RAND LIBC\n"); int i; int count; int rand_val; sds params; sds out_result; sds *tokens; if (data == NULL) { rand_val = rand(); snprintf(buf, buf_size, "%d", rand_val); } else { //cut output to 512 char str_integer[16]; int rand_state; params = sdsnew(data); out_result = sdsempty(); tokens = sdssplitargs(params, &count); for (i=0;i