Lines Matching refs:size
12 // strcpy and strncat with size checking. Size is the total space in "dest",
16 void xstrncpy(char *dest, char *src, size_t size)
18 if (strlen(src)+1 > size) error_exit("'%s' > %ld bytes", src, (long)size);
22 void xstrncat(char *dest, char *src, size_t size)
26 if (len+strlen(src)+1 > size)
27 error_exit("'%s%s' > %ld bytes", dest, src, (long)size);
69 void *xmalloc(size_t size)
71 void *ret = malloc(size);
72 if (!ret) error_exit("xmalloc(%ld)", (long)size);
78 void *xzalloc(size_t size)
80 void *ret = xmalloc(size);
81 memset(ret, 0, size);
85 // Die unless we can change the size of an existing allocation, possibly
87 void *xrealloc(void *ptr, size_t size)
89 ptr = realloc(ptr, size);
734 int len, size = 0;
739 size +=64;
740 buf = xrealloc(buf, size);
741 len = readlinkat(dir, name, buf, size);
747 if (len<size) {