From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/2] fixup! stdio: stub out basprintf and friends when built for PBL
Date: Mon, 2 Dec 2024 12:37:28 +0100 [thread overview]
Message-ID: <20241202113729.599540-1-a.fatoum@pengutronix.de> (raw)
asprintf and vasprintf return only -1 as error code, so have the stub
follow suit for symmetry.
No functional change expected.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/stdio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/stdio.h b/include/stdio.h
index 03cd3d281890..883b06529fdc 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -32,7 +32,7 @@ static inline char *basprintf(const char *fmt, ...)
}
static inline int asprintf(char **strp, const char *fmt, ...)
{
- return -ENOMEM;
+ return -1;
}
static inline char *bvasprintf(const char *fmt, va_list ap)
{
@@ -40,7 +40,7 @@ static inline char *bvasprintf(const char *fmt, va_list ap)
}
static inline int vasprintf(char **strp, const char *fmt, va_list ap)
{
- return -ENOMEM;
+ return -1;
}
#endif
--
2.39.5
next reply other threads:[~2024-12-02 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 11:37 Ahmad Fatoum [this message]
2024-12-02 11:37 ` [PATCH 2/2] " Ahmad Fatoum
2024-12-02 12:37 ` [PATCH 1/2] " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241202113729.599540-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox