Home | History | Annotate | Download | only in util

Lines Matching defs:len

31 		size_t len = (ret >= size) ? size - 1 : ret;
32 memcpy(dest, src, len);
33 dest[len] = '\0';
61 size_t len;
63 len = strlen(perf_dir);
64 if (n < len + 1)
66 memcpy(buf, perf_dir, len);
67 if (len && !is_dir_sep(perf_dir[len-1]))
68 buf[len++] = '/';
69 len += vsnprintf(buf + len, n - len, fmt, args);
70 if (len >= n)
91 unsigned len;
95 len = vsnprintf(pathname, PATH_MAX, fmt, args);
97 if (len >= PATH_MAX)
107 unsigned len;
109 len = strlen(perf_dir);
110 if (len > PATH_MAX-100)
112 memcpy(pathname, perf_dir, len);
113 if (len && perf_dir[len-1] != '/')
114 pathname[len++] = '/';
116 len += vsnprintf(pathname + len, PATH_MAX - len, fmt, args);
118 if (len >= PATH_MAX)
124 static inline int chomp_trailing_dir_sep(const char *path, int len)
126 while (len && is_dir_sep(path[len - 1]))
127 len--;
128 return len;