diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-02 01:36:05 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-10-02 01:36:05 +0200 |
commit | 505bc9b491e7b36b0f18c72eea5b109e7285ad5e (patch) | |
tree | e1bb7d5bc370ed7685a32688e129f7869197521b /sys/src/cmd/hjfs | |
parent | da2d0ee780c1542b2cbcb1f7dbd808c59356ae46 (diff) |
lib9p/hjfs: use x != ~0 instead (type)~x conditionals to work arround arm compiler issue
Diffstat (limited to 'sys/src/cmd/hjfs')
-rw-r--r-- | sys/src/cmd/hjfs/fs2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/cmd/hjfs/fs2.c b/sys/src/cmd/hjfs/fs2.c index d823222e5..4a0e7b9f5 100644 --- a/sys/src/cmd/hjfs/fs2.c +++ b/sys/src/cmd/hjfs/fs2.c @@ -716,16 +716,16 @@ chanwstat(Chan *ch, Dir *di) ingroup(ch->fs, ch->uid, d->gid, 1) || (ch->fs->flags & FSNOPERM) != 0 || (ch->flags & CHFNOPERM) != 0; - if((uvlong)~di->length){ + if(di->length != ~0){ if(isdir && di->length != 0) goto inval; if((ch->flags & CHFNOPERM) == 0) if(di->length != d->size && !permcheck(ch->fs, d, ch->uid, OWRITE)) goto perm; } - if((ulong)~di->mtime && !owner) + if(di->mtime != ~0 && !owner) goto perm; - if((ulong)~di->mode && !owner) + if(di->mode != ~0 && !owner) goto perm; nuid = NOUID; ngid = NOUID; @@ -737,13 +737,13 @@ chanwstat(Chan *ch, Dir *di) goto inval; if((nuid != NOUID || ngid != NOUID) && !owner) goto perm; - if((uvlong)~di->length && !isdir){ + if(di->length != ~0 && !isdir){ trunc(ch->fs, ch->loc, b, di->length); modified(ch, d); } - if((ulong)~di->mtime) + if(di->mtime != ~0) d->mtime = di->mtime; - if((ulong)~di->mode){ + if(di->mode != ~0){ d->mode = d->mode & ~0777 | di->mode & 0777; ch->loc->type = d->type = di->mode >> 24; } |