ref: fc786401185347576d53e1e5b411d92ada469721
parent: dd4a487b0e1988ba9b61a836a84205a966e40f5a
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 14 09:18:09 EST 2014
nusb/ether: fix pointer truncation
--- a/sys/src/cmd/nusb/ether/ether.c
+++ b/sys/src/cmd/nusb/ether/ether.c
@@ -91,7 +91,7 @@
#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)