fix silly bug, dont read stdin ;) - sdhcp - simple dhcp client
 (HTM) git clone git://git.codemadness.org/sdhcp
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 4f0cb77b97c5b7e907cd5b1e926a1d992f566995
 (DIR) parent 3acad37482310e721ce213ab49feecdd0b8719e0
 (HTM) 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:
         M sdhcp.c                             |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) 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);