git.samba.org
/
tridge
/
junkcode.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added expected_throughput.pl
[tridge/junkcode.git]
/
read.c
1
int read_x(int fd, char *buf, size_t size)
2
{
3
size_t n;
4
if (size == 0) return 0;
5
n = random() % size;
6
if (n == 0) n = 1;
7
return read(fd, buf, n);
8
}
9
10
foo()
11
{
12
read_x(fd, buf, size);
13
}