Since glibc-2.43:
For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr,
strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers
into their input arrays now have definitions as macros that return a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type.
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
pack_t *
pack_find(const char *name)
{
- struct format *format;
+ const struct format *format;
format = bsearch(name, formats,
sizeof(formats)/sizeof(formats[0]),
ssize_t bytes_read;
ssize_t total_size = 0;
ssize_t find_off = 0;
- const void *t;
- void *nl;
+ const void *nl, *t;
char *u;
/* Accumulate line in a line buffer. */
{
ssize_t bytes_read;
ssize_t total_size = 0;
- const void *t;
+ const void *p, *t;
const char *s;
- void *p;
if (tar_flush_unconsumed(a, unconsumed) != ARCHIVE_OK) {
return (ARCHIVE_FATAL);
static int
get_path_component(char *name, size_t n, const char *fn)
{
- char *p;
+ const char *p;
size_t l;
p = strchr(fn, '/');
static int
get_path_component(char *name, size_t n, const char *fn)
{
- char *p;
+ const char *p;
size_t l;
p = strchr(fn, '/');
static const char _uri[] = "";
static const char _fil[] = "file://";
const char *u;
- char *chk = strchr(hdr.tgturi, ':');
+ const char *chk = strchr(hdr.tgturi, ':');
if (chk != NULL && chk[1U] == '/' && chk[2U] == '/') {
/* yep, it's definitely a URI */