Project

General

Profile

Bug #1964 » 0007-Fix-compilation-against-glibc-2.43.patch

S3_2, S3_1, S3_0, S2_6 - Marko Lindqvist, 03/22/2026 02:27 AM

View differences:

utility/log.c
}
do {
struct log_fileinfo *pfile = log_files + i;
char *d = strchr(tok, ',');
const char *dtmp = strchr(tok, ',');
pfile->min = 0;
pfile->max = 0;
pfile->level = level;
if (d) {
char *pc = d + 1;
if (dtmp) {
char *d, *dm;
char *pc;
d[0] = '\0';
d = strchr(d + 1, ',');
dm = fc_malloc(strlen(dtmp) + 1);
strcpy(dm, dtmp);
pc = dm + 1;
dm[0] = '\0';
d = strchr(dm + 1, ',');
if (d && *pc != '\0' && d[1] != '\0') {
d[0] = '\0';
if (!str_to_uint(pc, &pfile->min)) {
......
goto out;
}
}
free(dm);
}
if (strlen(tok) == 0) {
fc_fprintf(stderr, _("Empty filename in log level argument \"%s\".\n"),
utility/shared.c
****************************************************************************/
char scanin(const char **buf, char *delimiters, char *dest, int size)
{
char *ptr, found = '?';
char found = '?';
bool sf = FALSE;
if (*buf == NULL || strlen(*buf) == 0 || size == 0) {
if (dest) {
......
}
if (dest) {
char *ptr;
strncpy(dest, *buf, size-1);
dest[size-1] = '\0';
dest[size - 1] = '\0';
remove_leading_trailing_spaces(dest);
ptr = strpbrk(dest, delimiters);
if (ptr != NULL) {
found = *ptr;
*ptr = '\0';
remove_leading_trailing_spaces(dest);
sf = TRUE;
}
} else {
const char *ptr;
/* Just skip ahead. */
ptr = strpbrk(*buf, delimiters);
}
if (ptr != NULL) {
found = *ptr;
if (dest) {
*ptr = '\0';
}
if (dest) {
remove_leading_trailing_spaces(dest);
if (ptr != NULL) {
found = *ptr;
sf = TRUE;
}
}
if (sf) {
*buf = strpbrk(*buf, delimiters);
if (*buf != NULL) {
(*buf)++; /* Skip delimiter */
(2-2/2)