Lines Matching defs:buf
54 char *buf = NULL;
65 if ((buf = calloc(1, size)) == NULL) {
81 bytes = write(fd, buf, size);
112 bytes = pread(fd, buf, size, 0);
119 if (buf[idx] != 1) {
121 "bad data from read! got buf[%ud]=%d, expected 1\n",
122 idx, buf[idx]);
127 (void) printf("good data from read: buf[%ud]=1\n", idx);
132 if (buf != NULL) {
133 free(buf);