summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-14 14:18:09 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-14 14:18:09 +0100
commitfc786401185347576d53e1e5b411d92ada469721 (patch)
tree8fd309275a2c5d2dd0063ec0eda42a84d314709d
parentdd4a487b0e1988ba9b61a836a84205a966e40f5a (diff)
downloadplan9front-fc786401185347576d53e1e5b411d92ada469721.tar.xz
nusb/ether: fix pointer truncation
-rw-r--r--sys/src/cmd/nusb/ether/ether.c2
1 files changed, 1 insertions, 1 deletions
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)