summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Moody <moody@posixcafe.org>2022-12-03 00:41:05 +0000
committerJacob Moody <moody@posixcafe.org>2022-12-03 00:41:05 +0000
commit7eddb7fa7b965aeae238115e87d94db686d13614 (patch)
tree3087e20e590649c42e6b95b4f7c562430baabad3
parent3932622c292dbf4ce5f65fa2a6fb6b3a3c77f174 (diff)
kernel: fix devsrv compilation on arm32
-rw-r--r--sys/src/9/port/devsrv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/port/devsrv.c b/sys/src/9/port/devsrv.c
index f7d0584b2..a7b35e292 100644
--- a/sys/src/9/port/devsrv.c
+++ b/sys/src/9/port/devsrv.c
@@ -5,7 +5,7 @@
#include "fns.h"
#include "../port/error.h"
-#define SRVTYPE(x) (((uvlong)x)&0x3)
+#define SRVTYPE(x) (((uint)x)&0x3)
#define SRVPATH(x) (((uvlong)x)>>2)
#define SRVQID(x, t) ((((uvlong)x)<<2)|((t)&0x3))
@@ -99,7 +99,6 @@ boardclunk(Board *b, int close)
{
Srv *sp, *prv;
Board *ch;
- long ref;
if(b == &root)
return;
@@ -117,7 +116,8 @@ boardclunk(Board *b, int close)
}
b->srv = nil;
}
- ref = decref(b);
+ if(decref(b) != 0)
+ return;
/*
* All boards must be walkable from root. So a board
@@ -125,7 +125,7 @@ boardclunk(Board *b, int close)
* still has active children. For leaf nodes we then
* have to walk up the tree to clear now empty parents.
*/
- while(b->closed && b->child == nil && ref == 0){
+ while(b->closed && b->child == nil){
//Root should never be closed
assert(b->parent != nil);
ch = remove((Link**)&b->parent->child, b->name, ~0UL);