| Date: Sun, 13 Jun 2010 18:06:19 +0200
define atoi as strtol for everybody
Diffstat:
src/9vx/a/netif.c | 2 +-
src/9vx/u.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
--- |
| @@ -341,7 +341,7 @@ netifwrite(Netif *nif, Chan *c, void *a, long n)
QLOCK(nif);
f = nif->f[NETID(c->qid.path)];
if((p = matchtoken(buf, "connect")) != 0){
- sscanf(p, "%x", &type);
+ type = atoi(p);
if(typeinuse(nif, type))
error(Einuse);
f->type = type; |
| @@ -17,3 +17,4 @@ typedef int socklen_t;
#define nil ((void*)0)
#define sleep _ksleep
#define syscall _ksyscall
+#define atoi(x) strtol(x, 0, 0) |