Hi Lizardo, On Fri, May 17, 2013, Anderson Lizardo wrote: > + fd = open("/dev/urandom", O_RDONLY); > + if (fd < 0) { > + ssize_t n; > + > + n = read(fd, &seed, sizeof(seed)); > + if (n < (ssize_t) sizeof(seed)) > + seed = time(NULL); > + > + close(fd); > + } else > + seed = time(NULL); So, it's not always wise to go blindly copying code examples/suggestions from Marcel without thinking a bit. You're checking for invalid fd when you should be checking for a valid one (>= 0). Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html