diff options
| author | Charles Forsyth <charles.forsyth@gmail.com> | 2015-10-10 12:06:44 +0100 |
|---|---|---|
| committer | Charles Forsyth <charles.forsyth@gmail.com> | 2015-10-10 12:06:44 +0100 |
| commit | d3641b487cf5cdc46e9b537d30eb37736e5c7b1a (patch) | |
| tree | 3599095fb0febcde280ef13b39e9ed551e97a4e7 | |
| parent | 7b2a26f5ade7740c41daf090053dc01edf16a8e9 (diff) | |
check correctly for matching DMDIR flags; 9-style main is void
| -rw-r--r-- | tools/styxtest/styxtest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/styxtest/styxtest.c b/tools/styxtest/styxtest.c index a6cca89f..166ccf77 100644 --- a/tools/styxtest/styxtest.c +++ b/tools/styxtest/styxtest.c @@ -151,7 +151,7 @@ fswstat(Qid qid, Dir *d) if(d->mode != ~0 && d->mode != f->d.mode){ if(!owner) return Eperm; - if(d->mode&DMDIR != f->d.mode&DMDIR) + if((d->mode&DMDIR) != (f->d.mode&DMDIR)) return Eperm; /* cannot change file->directory or vice-verse */ f->d.mode = d->mode; } @@ -180,6 +180,7 @@ Styxops ops = { fswstat, /* wstat */ }; +void main(int argc, char **argv) { Styxserver s; @@ -193,6 +194,5 @@ main(int argc, char **argv) styxwait(&s); styxprocess(&s); } - return 0; + exits(nil); } - |
