summaryrefslogtreecommitdiffstats
path: root/gl/vsnzprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/vsnzprintf.c')
-rw-r--r--gl/vsnzprintf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gl/vsnzprintf.c b/gl/vsnzprintf.c
index f6e6b1d4..0d35195f 100644
--- a/gl/vsnzprintf.c
+++ b/gl/vsnzprintf.c
@@ -1,5 +1,5 @@
1/* Formatted output to strings. 1/* Formatted output to strings.
2 Copyright (C) 2004, 2006-2025 Free Software Foundation, Inc. 2 Copyright (C) 2004, 2006-2026 Free Software Foundation, Inc.
3 Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>. 3 Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
4 4
5 This file is free software: you can redistribute it and/or modify 5 This file is free software: you can redistribute it and/or modify
@@ -33,12 +33,9 @@
33ptrdiff_t 33ptrdiff_t
34vsnzprintf (char *str, size_t size, const char *format, va_list args) 34vsnzprintf (char *str, size_t size, const char *format, va_list args)
35{ 35{
36 char *output;
37 size_t len;
38 size_t lenbuf = size; 36 size_t lenbuf = size;
39 37 char *output = vasnprintf (str, &lenbuf, format, args);
40 output = vasnprintf (str, &lenbuf, format, args); 38 size_t len = lenbuf;
41 len = lenbuf;
42 39
43 if (!output) 40 if (!output)
44 return -1; 41 return -1;