Coverage Report

Created: 2025-07-18 06:43

/src/plan9port/src/lib9/readn.c
Line
Count
Source (jump to first uncovered line)
1
#include <lib9.h>
2
3
long
4
readn(int f, void *av, long n)
5
0
{
6
0
  char *a;
7
0
  long m, t;
8
9
0
  a = av;
10
0
  t = 0;
11
0
  while(t < n){
12
0
    m = read(f, a+t, n-t);
13
0
    if(m <= 0){
14
0
      if(t == 0)
15
0
        return m;
16
0
      break;
17
0
    }
18
0
    t += m;
19
0
  }
20
0
  return t;
21
0
}