X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fodhcp6c.c;h=dce1e0ee7494a3893df9ebef0625d75b7c042bcb;hp=8b5cb54308c8f7224e37c3dbd7d5e1571981d53e;hb=ec864c44e9959a5d65cc564182f4e960e47c6e9e;hpb=0812d31deabe32918fd5b9498f0a8b2c2962d70b diff --git a/src/odhcp6c.c b/src/odhcp6c.c index 8b5cb54..dce1e0e 100644 --- a/src/odhcp6c.c +++ b/src/odhcp6c.c @@ -445,7 +445,7 @@ static int usage(void) " -e Write logmessages to stderr\n" " -v Increase logging verbosity\n" " -h Show this help\n\n"; - write(STDERR_FILENO, buf, sizeof(buf)); + fputs(buf, stderr); return 1; } @@ -654,9 +654,9 @@ uint32_t odhcp6c_elapsed(void) } -void odhcp6c_random(void *buf, size_t len) +int odhcp6c_random(void *buf, size_t len) { - read(urandom_fd, buf, len); + return read(urandom_fd, buf, len); } bool odhcp6c_is_bound(void)