Lines Matching refs:buf
496 char buf[80] = { 0 }; in test_vperror() local
499 char *prv = fgets(buf, sizeof(buf), efile); in test_vperror()
515 return strcmp(expected, buf) == 0 ? TEST_PASS : TEST_FAIL; in test_vperror()
518 static void send_ascii_command(const char *buf) { in send_ascii_command() argument
520 const char* ptr = buf; in send_ascii_command()
521 size_t len = strlen(buf); in send_ascii_command()
667 static void safe_send(const void* buf, size_t len, bool hickup) in safe_send() argument
670 const char* ptr = buf; in safe_send()
709 static bool safe_recv(void *buf, size_t len) { in safe_recv() argument
715 ssize_t nr = read(sock, ((char*)buf) + offset, len - offset); in safe_recv()
733 static bool safe_recv_packet(void *buf, size_t size) { in safe_recv_packet() argument
734 protocol_binary_response_no_extras *response = buf; in safe_recv_packet()
745 char *ptr = buf; in safe_recv_packet()
753 ptr = buf; in safe_recv_packet()
770 static off_t storage_command(char*buf, in storage_command() argument
780 protocol_binary_request_set *request = (void*)buf; in storage_command()
795 memcpy(buf + key_offset, key, keylen); in storage_command()
797 memcpy(buf + key_offset + keylen, dta, dtalen); in storage_command()
803 static off_t ext_command(char* buf, in ext_command() argument
812 protocol_binary_request_no_extras *request = (void*)buf; in ext_command()
828 memcpy(buf + ext_offset, ext, extlen); in ext_command()
831 memcpy(buf + key_offset, key, keylen); in ext_command()
834 memcpy(buf + dta_offset, dta, dtalen); in ext_command()
840 static off_t raw_command(char* buf, in raw_command() argument
848 return ext_command(buf, bufsz, cmd, NULL, 0, key, keylen, dta, dtalen); in raw_command()
851 static off_t flush_command(char* buf, size_t bufsz, uint8_t cmd, uint32_t exptime, bool use_extra) { in flush_command() argument
852 protocol_binary_request_flush *request = (void*)buf; in flush_command()
873 static off_t touch_command(char* buf, in touch_command() argument
879 protocol_binary_request_touch *request = (void*)buf; in touch_command()
895 memcpy(buf + key_offset, key, keylen); in touch_command()
899 static off_t arithmetic_command(char* buf, in arithmetic_command() argument
907 protocol_binary_request_incr *request = (void*)buf; in arithmetic_command()
923 memcpy(buf + key_offset, key, keylen); in arithmetic_command()