summaryrefslogtreecommitdiff
path: root/sys/src/cmd/webfs/fs.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-01-07 04:44:13 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-01-07 04:44:13 +0100
commit772afbe98c7e74be35e7e5318967ce594e4d93e8 (patch)
tree006ef64214c4ab980ff3125ea812f42235706b5b /sys/src/cmd/webfs/fs.c
parent9c99d0c8d3236b87bd292ac29d4d1b2d5f550bd5 (diff)
format pointer subtraction results with %zd instead of %ld (for long -> intptr on amd64)
Diffstat (limited to 'sys/src/cmd/webfs/fs.c')
-rw-r--r--sys/src/cmd/webfs/fs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/webfs/fs.c b/sys/src/cmd/webfs/fs.c
index 981884417..7f2eb70fd 100644
--- a/sys/src/cmd/webfs/fs.c
+++ b/sys/src/cmd/webfs/fs.c
@@ -84,7 +84,7 @@ static char *agent;
static Client client[64];
static int nclient;
-#define CLIENTID(c) (((Client*)(c)) - client)
+#define CLIENTID(c) ((int)(((Client*)(c)) - client))
Client*
newclient(void)
@@ -222,7 +222,7 @@ fsmkdir(Dir *d, int level, void *aux)
d->length = strlen(((Key*)aux)->val);
break;
case Qclient:
- snprint(buf, sizeof(buf), "%ld", CLIENTID(aux));
+ snprint(buf, sizeof(buf), "%d", CLIENTID(aux));
d->name = estrdup(buf);
break;
case Qctl:
@@ -530,7 +530,7 @@ fsread(Req *r)
respond(r, nil);
return;
case Qctl:
- snprint(buf, sizeof(buf), "%ld\n", CLIENTID(f->client));
+ snprint(buf, sizeof(buf), "%d\n", CLIENTID(f->client));
goto String;
case Qheader:
snprint(buf, sizeof(buf), "%s", f->key->val);