summaryrefslogtreecommitdiff
path: root/appl/lib/auth9.b
diff options
context:
space:
mode:
Diffstat (limited to 'appl/lib/auth9.b')
-rw-r--r--appl/lib/auth9.b8
1 files changed, 2 insertions, 6 deletions
diff --git a/appl/lib/auth9.b b/appl/lib/auth9.b
index 06accb53..d9f38c71 100644
--- a/appl/lib/auth9.b
+++ b/appl/lib/auth9.b
@@ -288,12 +288,8 @@ decrypt(key: array of byte, data: array of byte, n: int)
readn(fd: ref Sys->FD, nb: int): array of byte
{
buf:= array[nb] of byte;
- for(n:=0; n<nb;){
- m := sys->read(fd, buf[n:], nb-n);
- if(m <= 0)
- return nil;
- n += m;
- }
+ if(sys->readn(fd, buf, nb) != nb)
+ return nil;
return buf;
}