diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-11 12:31:14 +0200 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-25 12:48:12 +0200 |
| commit | ca4af17c5e4a55b73850163dfc64a7d3c69378be (patch) | |
| tree | 995a5a65ccdd9efdc03040ed18541091d839c540 /hw/net/imx_fec.c | |
| parent | a6ab7a98c9a8106cb8ef86cbc88a27fe69963423 (diff) | |
| download | focaccia-qemu-ca4af17c5e4a55b73850163dfc64a7d3c69378be.tar.gz focaccia-qemu-ca4af17c5e4a55b73850163dfc64a7d3c69378be.zip | |
hw/misc/imx: Replace sprintf() by snprintf()
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1, resulting in painful developer experience. Use snprintf() instead. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20240411104340.6617-6-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'hw/net/imx_fec.c')
| -rw-r--r-- | hw/net/imx_fec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c index cee84af7ba..8c91d20d44 100644 --- a/hw/net/imx_fec.c +++ b/hw/net/imx_fec.c @@ -41,7 +41,7 @@ static const char *imx_default_reg_name(IMXFECState *s, uint32_t index) { static char tmp[20]; - sprintf(tmp, "index %d", index); + snprintf(tmp, sizeof(tmp), "index %d", index); return tmp; } |