sdhcp

simple dhcp client
git clone git://git.2f30.org/sdhcp
Log | Files | Refs | LICENSE

commit 4f0cb77b97c5b7e907cd5b1e926a1d992f566995
parent 3acad37482310e721ce213ab49feecdd0b8719e0
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 26 Apr 2014 00:02:49 +0200

fix silly bug, dont read stdin ;)

mismatch braces so rnd evaluated to 0 (stdin).

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Msdhcp.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sdhcp.c b/sdhcp.c @@ -464,7 +464,7 @@ main(int argc, char *argv[]) ioctl(sock, SIOCGIFHWADDR, &ifreq); memcpy(hwaddr, ifreq.ifr_hwaddr.sa_data, sizeof ifreq.ifr_hwaddr.sa_data); - if((rnd = open("/dev/urandom", O_RDONLY) == -1)) + if((rnd = open("/dev/urandom", O_RDONLY)) == -1) eprintf("can't open /dev/urandom to generate unique transaction identifier:"); read(rnd, xid, sizeof xid); close(rnd);