/support/ |
A D | tst-support_quote_string.c | 27 char *p = support_quote_string (""); in do_test() local 28 TEST_COMPARE (strlen (p), 0); in do_test() 29 free (p); in do_test() 30 p = support_quote_string ("X"); in do_test() 31 TEST_COMPARE (strlen (p), 1); in do_test() 32 TEST_COMPARE (p[0], 'X'); in do_test() 33 free (p); in do_test() 37 p = support_quote_string ("$()*?`@[]{}~\'\"X"); in do_test() 39 free (p); in do_test() 48 free (p); in do_test() [all …]
|
A D | tst-support_quote_blob.c | 29 char *p = support_quote_blob ("", 0); in do_test() local 30 TEST_COMPARE (strlen (p), 0); in do_test() 31 free (p); in do_test() 32 p = support_quote_blob ("X", 0); in do_test() 33 TEST_COMPARE (strlen (p), 0); in do_test() 34 free (p); in do_test() 38 p = support_quote_blob ("$()*?`@[]{}~\'\"X", 14); in do_test() 40 free (p); in do_test() 48 TEST_COMPARE (strcmp (p, LETTERS_AND_DIGTS), 0); in do_test() 49 free (p); in do_test() [all …]
|
A D | tst-support_quote_blob_wide.c | 29 char *p = support_quote_blob_wide (L"", 0); in do_test() local 30 TEST_COMPARE (strlen (p), 0); in do_test() 31 free (p); in do_test() 32 p = support_quote_blob_wide (L"X", 0); in do_test() 33 TEST_COMPARE (strlen (p), 0); in do_test() 34 free (p); in do_test() 39 TEST_COMPARE (strcmp (p, "$()*?`@[]{}~\\'\\\""), 0); in do_test() 40 free (p); in do_test() 51 TEST_COMPARE (strcmp (p, LETTERS_AND_DIGTS), 0); in do_test() 52 free (p); in do_test() [all …]
|
A D | xwrite.c | 26 const char *p = buffer; in xwrite() local 27 const char *end = p + length; in xwrite() 28 while (p < end) in xwrite() 30 ssize_t ret = write (fd, p, end - p); in xwrite() 33 length, p - (const char *) buffer); in xwrite() 36 p - (const char *) buffer, length); in xwrite() 37 p += ret; in xwrite()
|
A D | xmalloc.c | 28 void *p; in xmalloc() local 30 p = malloc (n); in xmalloc() 31 if (p == NULL) in xmalloc() 33 return p; in xmalloc()
|
A D | xcalloc.c | 28 void *p; in xcalloc() local 30 p = calloc (n, s); in xcalloc() 31 if (p == NULL) in xcalloc() 33 return p; in xcalloc()
|
A D | xstrdup.c | 26 char *p = strdup (s); in xstrdup() local 27 if (p == NULL) in xstrdup() 29 return p; in xstrdup()
|
A D | support_write_file_string.c | 29 for (const char *p = contents; p < end; ) in support_write_file_string() local 31 ssize_t ret = write (fd, p, end - p); in support_write_file_string() 36 p += ret; in support_write_file_string()
|
A D | xsetlocale.c | 26 char *p = setlocale (category, locale); in xsetlocale() local 27 if (p == NULL) in xsetlocale() 29 return p; in xsetlocale()
|
A D | xstrndup.c | 26 char *p = strndup (s, length); in xstrndup() local 27 if (p == NULL) in xstrndup() 29 return p; in xstrndup()
|
A D | tst-support_blob_repeat.c | 48 unsigned char *p = repeat.start; in do_test() local 50 if (p[i] != 'X') in do_test() 54 p[0] = 'Y'; in do_test() 55 p[1U << 24] = 'Z'; in do_test() 58 TEST_COMPARE (p[i], 'Y'); in do_test() 60 TEST_COMPARE (p[i], 'Z'); in do_test() 61 else if (p[i] != 'X') in do_test() 79 unsigned char *p = repeat.start; in do_test() local 82 if (p[i * 9 + j] != '0' + j) in do_test() 85 TEST_COMPARE (p[i * 9 + j], '0' + j); in do_test() [all …]
|
A D | xrealloc.c | 26 xrealloc (void *p, size_t n) in xrealloc() argument 28 void *result = realloc (p, n); in xrealloc() 29 if (result == NULL && (n > 0 || p == NULL)) in xrealloc()
|
A D | xposix_memalign.c | 26 void *p = NULL; in xposix_memalign() local 28 int ret = posix_memalign (&p, alignment, n); in xposix_memalign() 34 return p; in xposix_memalign()
|
A D | support_copy_file_range.c | 99 for (char *p = buf; p < end; ) in support_copy_file_range() local 103 write_count = write (outfd, p, end - p); in support_copy_file_range() 105 write_count = pwrite64 (outfd, p, end - p, *poutoff); in support_copy_file_range() 111 size_t written = p - buf; in support_copy_file_range() 134 p += write_count; in support_copy_file_range()
|
A D | support_capture_subprocess.c | 143 char *p = buf; in copy_and_spawn_sgid() local 145 while (p != end) in copy_and_spawn_sgid() 147 ssize_t wrcount = write (outfd, buf, end - p); in copy_and_spawn_sgid() 153 p += wrcount; in copy_and_spawn_sgid() 233 support_capture_subprocess_free (struct support_capture_subprocess *p) in support_capture_subprocess_free() argument 235 free (p->out.buffer); in support_capture_subprocess_free() 236 free (p->err.buffer); in support_capture_subprocess_free()
|
A D | support_quote_blob_main.c | 28 const CHAR *p = blob; in SUPPORT_QUOTE_BLOB() local 31 CHAR ch = p[i]; in SUPPORT_QUOTE_BLOB()
|
A D | tst-support_capture_subprocess.c | 44 transfer (const unsigned char **p, int fd) in transfer() argument 46 if (**p != '\0') in transfer() 48 TEST_VERIFY (write (fd, *p, 1) == 1); in transfer() 49 ++*p; in transfer()
|
A D | resolv_test.c | 61 const unsigned char *p; in allocate_compressed_name() local 62 for (p = encoded; *p != '\0';) in allocate_compressed_name() 65 TEST_VERIFY (*p <= 63); in allocate_compressed_name() 67 p += 1 + *p; in allocate_compressed_name() 69 length = p - encoded; in allocate_compressed_name()
|