From fc786401185347576d53e1e5b411d92ada469721 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 14 Feb 2014 14:18:09 +0100 Subject: [PATCH] nusb/ether: fix pointer truncation --- sys/src/cmd/nusb/ether/ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/nusb/ether/ether.c b/sys/src/cmd/nusb/ether/ether.c index c7a622255..2c9a9121a 100644 --- a/sys/src/cmd/nusb/ether/ether.c +++ b/sys/src/cmd/nusb/ether/ether.c @@ -91,7 +91,7 @@ static char *uname; #define PATH(type, n) ((type)|((n)<<8)) #define TYPE(path) (((uint)(path) & 0x000000FF)>>0) #define NUM(path) (((uint)(path) & 0xFFFFFF00)>>8) -#define NUMCONN(c) (((long)(c)-(long)&conn[0])/sizeof(conn[0])) +#define NUMCONN(c) (((uintptr)(c)-(uintptr)&conn[0])/sizeof(conn[0])) static void fillstat(Dir *d, uvlong path)