/freebsd-11-stable/contrib/wpa/wpa_supplicant/ |
H A D | wpa_passphrase.c | 19 char *ssid, *passphrase, buf[64], *pos; local 35 if (fgets(buf, sizeof(buf), stdin) == NULL) { 39 buf[sizeof(buf) - 1] = '\0'; 40 pos = buf; 48 passphrase = buf;
|
/freebsd-11-stable/contrib/ofed/infiniband-diags/src/ |
H A D | ibccquery.c | 87 char buf[2048]; local 94 mad_dump_classportinfo(buf, sizeof buf, data, sizeof data); 96 printf("# ClassPortInfo: %s\n%s", portid2str(dest), buf); 102 char buf[2048]; local 109 mad_dump_cc_congestioninfo(buf, sizeof buf, data, sizeof data); 111 printf("# CongestionInfo: %s\n%s", portid2str(dest), buf); 117 char buf[2048]; local 124 mad_dump_cc_congestionkeyinfo(buf, sizeo 132 char buf[2048]; local 188 char buf[2048]; local 203 char buf[2048]; local 265 char buf[2048]; local 289 char buf[2048]; local 329 char buf[2048]; local [all...] |
H A D | ibportstate.c | 162 char buf[2300]; local 165 mad_dump_portstates(buf, sizeof buf, data, sizeof *data); 167 mad_dump_field(IB_PORT_LID_F, buf + strlen(buf), 168 sizeof buf - strlen(buf), val); 169 sprintf(buf + strlen(buf), "%s", "\n"); 171 mad_dump_field(IB_PORT_SMLID_F, buf 265 char buf[256]; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/fs/kernfs/ |
H A D | t_basic.c | 47 char buf[8192]; local 54 if (rump_sys_getdents(dfd, buf, sizeof(buf)) == -1) 61 dent = (void *)buf; 81 static char buf[8192]; local 87 blen = sizeof(buf); 88 if (rump_sys___sysctl(mib, 2, buf, &blen, NULL, 0) == -1) 91 return buf; 97 char buf[8192]; local 107 buf[ [all...] |
/freebsd-11-stable/sys/contrib/zlib/ |
H A D | adler32.c | 16 #define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} 17 #define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); 18 #define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); 19 #define DO8(buf,i) DO4(buf, [all...] |
/freebsd-11-stable/contrib/smbfs/include/netsmb/ |
H A D | smb_lib.h | 64 #define getb(buf,ofs) (((const u_int8_t *)(buf))[ofs]) 65 #define setb(buf,ofs,val) (((u_int8_t*)(buf))[ofs])=val 66 #define getbw(buf,ofs) ((u_int16_t)(getb(buf,ofs))) 67 #define getw(buf,ofs) (*((u_int16_t*)(&((u_int8_t*)(buf))[ofs]))) 68 #define getdw(buf,ofs) (*((u_int32_t*)(&((u_int8_t*)(buf))[of [all...] |
/freebsd-11-stable/contrib/nvi/common/ |
H A D | encoding.c | 62 const u_char *buf = (u_char *)ibuf; local 68 if ((buf[i] & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ 74 if (text_chars[buf[i]] != T) 76 } else if ((buf[i] & 0x40) == 0) { /* 10xxxxxx never 1st byte */ 81 if ((buf[i] & 0x20) == 0) /* 110xxxxx */ 82 if (buf[i] > 0xC1) /* C0, C1 */ 85 else if ((buf[i] & 0x10) == 0) /* 1110xxxx */ 87 else if ((buf[i] & 0x08) == 0) /* 11110xxx */ 88 if (buf[i] < 0xF5) 99 if ((buf[ 123 const u_char *buf = (u_char *)ibuf; local 183 const u_char *buf = (u_char *)ibuf; local 215 const u_char *buf = (u_char *)ibuf; local [all...] |
/freebsd-11-stable/contrib/apr/misc/unix/ |
H A D | errorcodes.c | 33 static char *stuffbuffer(char *buf, apr_size_t bufsize, const char *s) argument 35 apr_cpystrn(buf,s,bufsize); 36 return buf; 153 static char *apr_os_strerror(char* buf, apr_size_t bufsize, int err) argument 162 return stuffbuffer(buf, bufsize, 190 return stuffbuffer(buf, bufsize, result); 252 static char *apr_os_strerror(char *buf, apr_size_t bufsize, apr_status_t errcode) argument 263 buf, 267 LPTSTR msg = (LPTSTR) buf; 279 buf[ 324 apr_os_strerror(char* buf, apr_size_t bufsize, int err) argument 357 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 379 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 397 native_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument 416 apr_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize) argument [all...] |
/freebsd-11-stable/contrib/tcsh/ |
H A D | ed.xmap.c | 138 xm.str.buf = str->buf; 175 if (ptr->ch == *(ch->buf)) { 183 *(ch->buf) = tch; 189 *(ch->buf) = '\0'; 201 val->str.buf = NULL; 212 cs.buf = Xkey->buf; 240 if (ptr->ch != *(str->buf)) { 244 if (xm->sibling->ch == *(str->buf)) 433 struct Strbuf buf = Strbuf_INIT; local 461 Lookup(struct Strbuf *buf, const CStr *str, const XmapNode *ptr) argument 506 Enumerate(struct Strbuf *buf, const XmapNode *ptr) argument 573 unparsech(struct Strbuf *buf, Char ch) argument 710 unsigned char *buf, *b; local [all...] |
/freebsd-11-stable/sys/sys/ |
H A D | buf.h | 34 * @(#)buf.h 8.9 (Berkeley) 3/30/95 35 * $FreeBSD: stable/11/sys/sys/buf.h 367145 2020-10-29 22:00:15Z brooks $ 47 struct buf; 64 void (*io_start)(struct buf *); 65 void (*io_complete)(struct buf *); 66 void (*io_deallocate)(struct buf *); 67 int (*io_countdeps)(struct buf *, int); 93 * Q - Protected by the buf queue lock 96 struct buf { struct 106 void (*b_iodone)(struct buf *); [all...] |
H A D | hash.h | 45 hash32_buf(const void *buf, size_t len, uint32_t hash) argument 47 const unsigned char *p = buf; 59 hash32_str(const void *buf, uint32_t hash) argument 61 const unsigned char *p = buf; 73 hash32_strn(const void *buf, size_t len, uint32_t hash) argument 75 const unsigned char *p = buf; 89 hash32_stre(const void *buf, int end, const char **ep, uint32_t hash) argument 91 const unsigned char *p = buf; 108 hash32_strne(const void *buf, size_t len, int end, const char **ep, argument 111 const unsigned char *p = buf; [all...] |
/freebsd-11-stable/crypto/heimdal/lib/roken/ |
H A D | strftime.c | 170 strftime (char *buf, size_t maxsize, const char *format, argument 183 ret = snprintf (buf, maxsize - n, 187 ret = snprintf (buf, maxsize - n, 192 ret = snprintf (buf, maxsize - n, 196 ret = snprintf (buf, maxsize - n, 200 ret = snprintf (buf, maxsize - n, 210 ret = snprintf (buf, maxsize - n, 214 ret = snprintf (buf, maxsize - n, 218 ret = snprintf (buf, maxsize - n, 225 ret = snprintf (buf, maxsiz [all...] |
/freebsd-11-stable/sbin/dhclient/ |
H A D | privsep.c | 25 struct buf * 28 struct buf *buf; local 30 if ((buf = calloc(1, sizeof(struct buf))) == NULL) 32 if ((buf->buf = malloc(len)) == NULL) { 33 free(buf); 36 buf->size = len; 38 return (buf); 42 buf_add(struct buf *buf, const void *data, size_t len) argument 53 buf_close(int sock, struct buf *buf) argument 77 buf_read(int sock, void *buf, size_t nbytes) argument 114 struct buf *buf; local [all...] |
/freebsd-11-stable/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_utility.cpp | 123 struct kmp_cpuid buf; local 134 __kmp_x86_cpuid(0, 0, &buf); 138 buf.eax, buf.ebx, buf.ecx, buf.edx)); 140 max_arg = buf.eax; 148 __kmp_x86_cpuid(1, 0, &buf); 151 1, buf.eax, buf [all...] |
/freebsd-11-stable/contrib/ntp/sntp/libevent/ |
H A D | arc4random.c | 126 read_all(int fd, unsigned char *buf, size_t count) argument 132 result = read(fd, buf+numread, count-numread); 152 unsigned char buf[ADD_ENTROPY]; local 162 if (!CryptGenRandom(provider, sizeof(buf), buf)) 164 arc4_addrandom(buf, sizeof(buf)); 165 evutil_memclear_(buf, sizeof(buf)); 182 unsigned char buf[ADD_ENTROP local 219 unsigned char buf[ADD_ENTROPY]; local 260 char buf[128]; local 301 unsigned char buf[ADD_ENTROPY]; local 500 unsigned char *buf = buf_; local [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_mlock.c | 69 void *buf; local 71 buf = malloc(page); 72 ATF_REQUIRE(buf != NULL); 78 (void)mlock(buf, page - i); 79 (void)munlock(buf, page - i); 82 free(buf); 110 void *buf; local 154 buf = malloc(page); /* Get a valid address */ 155 ATF_REQUIRE(buf != NULL); 159 ATF_REQUIRE_ERRNO(EINVAL, mlock(buf, 204 void *buf; local 277 void *buf; local 343 void *buf; local 385 void *buf, *addr; local 428 void *buf; local [all...] |
/freebsd-11-stable/lib/libmd/ |
H A D | mdXhl.c | 25 MDXEnd(MDX_CTX *ctx, char *buf) argument 31 if (!buf) 32 buf = malloc(2*LENGTH + 1); 33 if (!buf) 37 buf[i+i] = hex[digest[i] >> 4]; 38 buf[i+i+1] = hex[digest[i] & 0x0f]; 40 buf[i+i] = '\0'; 41 return buf; 45 MDXFd(int fd, char *buf) argument 47 return MDXFdChunk(fd, buf, 51 MDXFdChunk(int fd, char *buf, off_t ofs, off_t len) argument 92 MDXFile(const char *filename, char *buf) argument 98 MDXFileChunk(const char *filename, char *buf, off_t ofs, off_t len) argument 114 MDXData(const void *data, unsigned int len, char *buf) argument [all...] |
/freebsd-11-stable/lib/libc/gen/ |
H A D | setproctitle.c | 62 static char *buf = NULL; local 73 if (buf == NULL) { 74 buf = malloc(SPT_BUFSIZE); 75 if (buf == NULL) 77 nargv[0] = buf; 88 buf[SPT_BUFSIZE - 1] = '\0'; 96 (void)snprintf(buf, SPT_BUFSIZE, "%s: ", _getprogname()); 97 len = strlen(buf); 101 (void) vsnprintf(buf + len, SPT_BUFSIZE - len, fmt, ap); 105 kbuf = buf; 167 char *buf; local 189 char *buf; local [all...] |
/freebsd-11-stable/lib/libc/nameser/ |
H A D | ns_print.c | 59 char **buf, size_t *buflen); 62 char **buf, size_t *buflen); 63 static void addlen(size_t len, char **buf, size_t *buflen); 65 char **buf, size_t *buflen); 67 char **buf, size_t *buflen); 86 *\li Number of characters written to buf, or -1 (check errno). 91 char *buf, size_t buflen) 98 name_ctx, origin, buf, buflen); 106 *\li Number of characters written to buf, or -1 (check errno). 113 char *buf, size_ 89 ns_sprintrr(const ns_msg *handle, const ns_rr *rr, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 109 ns_sprintrrf(const u_char *msg, size_t msglen, const char *name, ns_class class, ns_type type, u_long ttl, const u_char *rdata, size_t rdlen, const char *name_ctx, const char *origin, char *buf, size_t buflen) argument 165 addlen(strlen(buf), &buf, &buflen); local 335 addlen(strlen(buf), &buf, &buflen); local 426 addlen(strlen(buf), &buf, &buflen); local 669 addlen(strlen(buf), &buf, &buflen); local 692 addlen(strlen(buf), &buf, &buflen); local 963 addlen(strlen(buf), &buf, &buflen); local 968 addlen(strlen(buf), &buf, &buflen); local 1137 charstr(const u_char *rdata, const u_char *edata, char **buf, size_t *buflen) argument 1171 addname(const u_char *msg, size_t msglen, const u_char **pp, const char *origin, char **buf, size_t *buflen) argument 1215 addlen(size_t len, char **buf, size_t *buflen) argument 1222 addstr(const char *src, size_t len, char **buf, size_t *buflen) argument 1234 addtab(size_t len, size_t target, int spaced, char **buf, size_t *buflen) argument [all...] |
/freebsd-11-stable/lib/msun/tests/ |
H A D | ilogb_test.c | 39 char buf[128], *end; local 50 snprintf(buf, sizeof(buf), "0x1.p%d", e); 51 d = strtod(buf, &end); 62 snprintf(buf, sizeof(buf), "0x1.p%d", e); 63 f = strtof(buf, &end); 74 snprintf(buf, sizeof(buf), "0x1.p%d", e); 75 ld = strtold(buf, [all...] |
/freebsd-11-stable/contrib/wpa/src/drivers/ |
H A D | driver_ndis_.c | 42 u8 *buf, size_t len) 48 wpa_hexdump(MSG_MSGDUMP, "NDIS: received event data", buf, len); 51 type = *((int *) buf); 52 pos = buf + sizeof(int); 55 if (buf + len - pos > 2) { 58 if (data_len > (size_t) (buf + len - pos)) { 89 u8 buf[512]; local 93 if (ReadFile(drv->events_pipe, buf, sizeof(buf), &len, NULL)) 94 wpa_driver_ndis_event_process(drv, buf, le 41 wpa_driver_ndis_event_process(struct wpa_driver_ndis_data *drv, u8 *buf, size_t len) argument [all...] |
/freebsd-11-stable/lib/libc/net/ |
H A D | gai_strerror.c | 83 char *buf; local 86 buf = gai_buf; 91 if ((buf = thr_getspecific(gai_key)) == NULL) { 92 if ((buf = malloc(sizeof(gai_buf))) == NULL) 94 if (thr_setspecific(gai_key, buf) != 0) { 95 free(buf); 103 strlcpy(buf, catgets(catd, 3, ecode, ai_errlist[ecode]), 106 strlcpy(buf, catgets(catd, 3, NL_MSGMAX - 1, "Success"), 109 strlcpy(buf, catgets(catd, 3, NL_MSGMAX, "Unknown error"), 112 return buf; [all...] |
/freebsd-11-stable/usr.sbin/bluetooth/ath3kfw/ |
H A D | ath3k_fw.c | 50 unsigned char *buf; local 66 buf = calloc(1, sb.st_size); 67 if (buf == NULL) { 75 r = read(fd, buf, sb.st_size); 78 free(buf); 88 free(buf); 100 fw->buf = buf; 111 if (fw->buf) 112 free(fw->buf); [all...] |
/freebsd-11-stable/contrib/xz/src/liblzma/check/ |
H A D | crc32_fast.c | 27 lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc) 37 // ensures that this won't read past the end of buf[]. 38 while ((uintptr_t)(buf) & 7) { 39 crc = lzma_crc32_table[0][*buf++ ^ A(crc)] ^ S8(crc); 44 const uint8_t *const limit = buf + (size & ~(size_t)(7)); 51 while (buf < limit) { 52 crc ^= aligned_read32ne(buf); 53 buf += 4; 60 const uint32_t tmp = aligned_read32ne(buf); 61 buf [all...] |
/freebsd-11-stable/contrib/netbsd-tests/lib/libc/string/ |
H A D | t_strcat.c | 134 char buf[100] = "abcdefg"; local 136 ATF_CHECK(strncat(buf, "xxx", 0) == buf); 137 ATF_CHECK(strcmp(buf, "abcdefg") == 0); 138 ATF_CHECK(strncat(buf, "xxx", 1) == buf); 139 ATF_CHECK(strcmp(buf, "abcdefgx") == 0); 140 ATF_CHECK(strncat(buf, "xxx", 2) == buf); 141 ATF_CHECK(strcmp(buf, "abcdefgxx [all...] |