summaryrefslogtreecommitdiff
path: root/lib/printf-parse.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
commitcfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch)
tree8016486f8ee7157213f2d09ff2491bfa9c94638a /lib/printf-parse.c
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'lib/printf-parse.c')
-rw-r--r--lib/printf-parse.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/printf-parse.c b/lib/printf-parse.c
index 7628cb23..34d241a6 100644
--- a/lib/printf-parse.c
+++ b/lib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2024 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -323,8 +323,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
}
{
- arg_type type;
-
/* Parse argument type/size specifiers. */
/* Relevant for the conversion characters d, i. */
arg_type signed_type = TYPE_INT;
@@ -561,6 +559,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
(void) pointer_type;
/* Read the conversion character. */
+ arg_type type;
c = *cp++;
switch (c)
{
@@ -654,17 +653,14 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
d->count++;
if (d->count >= d_allocated)
{
- size_t memory_size;
- DIRECTIVE *memory;
-
d_allocated = xtimes (d_allocated, 2);
- memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+ size_t memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
if (size_overflow_p (memory_size))
/* Overflow, would lead to out of memory. */
goto out_of_memory;
- memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir
- ? realloc (d->dir, memory_size)
- : malloc (memory_size));
+ DIRECTIVE *memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir
+ ? realloc (d->dir, memory_size)
+ : malloc (memory_size));
if (memory == NULL)
/* Out of memory. */
goto out_of_memory;