Lines Matching refs:sz
502 ssize_t fdevent_socket_read_discard (int fd, char *buf, size_t sz, int family, int so_type) { in fdevent_socket_read_discard() argument
505 ssize_t len = recv(fd, buf, sz, MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL); in fdevent_socket_read_discard()
512 return read(fd, buf, sz); in fdevent_socket_read_discard()
610 off_t sz = 0; in fdevent_load_file() local
624 sz = st.st_size; in fdevent_load_file()
625 buf = malloc_fn((size_t)sz+1);/*+1 trailing '\0' for str funcs on data*/ in fdevent_load_file()
628 if (sz) { in fdevent_load_file()
632 rd = read(fd, buf+off, (size_t)(sz-off)); in fdevent_load_file()
633 } while (rd > 0 ? (off += rd) != sz : rd < 0 && errno == EINTR); in fdevent_load_file()
634 if (off != sz) { /*(file truncated?)*/ in fdevent_load_file()
640 buf[sz] = '\0'; in fdevent_load_file()
641 *lim = sz; in fdevent_load_file()
650 ck_memzero(buf, (size_t)sz); in fdevent_load_file()
660 fdevent_load_file_bytes (char * const buf, const off_t sz, off_t off, const char * const fn, log_er… in fdevent_load_file_bytes() argument
672 rd = read(fd, buf+off, (size_t)(sz-off)); in fdevent_load_file_bytes()
673 } while (rd > 0 ? (off += rd) != sz : rd < 0 && errno == EINTR); in fdevent_load_file_bytes()
674 if (off != sz) { /*(file truncated? or incorrect sz requested)*/ in fdevent_load_file_bytes()
686 ck_memzero(buf, (size_t)sz); in fdevent_load_file_bytes()