summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-07 14:23:41 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-07 14:23:41 +0100
commit544bca0290df1dc512641a1ab23e184ccc2406b3 (patch)
treec5baed691d0e89d57be649d0688a6409a3c4170d
parented3ae3faa3cbb9171890d6c963a8d86cdeffd96b (diff)
downloadplan9front-544bca0290df1dc512641a1ab23e184ccc2406b3.tar.xz
rio: format pid's as ulongs
-rw-r--r--sys/src/cmd/rio/wind.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c
index 9734fd18f..1fd1b671c 100644
--- a/sys/src/cmd/rio/wind.c
+++ b/sys/src/cmd/rio/wind.c
@@ -1420,7 +1420,7 @@ wclosewin(Window *w)
void
wsetpid(Window *w, int pid, int dolabel)
{
- char buf[64];
+ char buf[32];
int ofd;
ofd = w->notefd;
@@ -1428,11 +1428,11 @@ wsetpid(Window *w, int pid, int dolabel)
w->notefd = -1;
else {
if(dolabel){
- snprint(buf, sizeof(buf), "rc %d", pid);
+ snprint(buf, sizeof(buf), "rc %lud", (ulong)pid);
free(w->label);
w->label = estrdup(buf);
}
- snprint(buf, sizeof(buf), "/proc/%d/notepg", pid);
+ snprint(buf, sizeof(buf), "/proc/%lud/notepg", (ulong)pid);
w->notefd = open(buf, OWRITE|OCEXEC);
}
if(ofd >= 0)