mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 01:55:19 +01:00
bhyve uart: Fix errors from GCC
- Place 'static' before other qualifiers (-Wold-style-declaration)
- Correct the order of arguments to calloc (-Wcalloc-transposed-args)
Reported by: GCC 14
Fixes: 1f903953fb
bhyve: Add raw tcp to uart backend
This commit is contained in:
parent
e3953c036f
commit
ad152571b8
@ -293,7 +293,7 @@ done:
|
||||
static void
|
||||
uart_tcp_listener(int fd, enum ev_type type __unused, void *arg)
|
||||
{
|
||||
const static char tcp_error_msg[] = "Socket already connected\n";
|
||||
static const char tcp_error_msg[] = "Socket already connected\n";
|
||||
struct uart_socket_softc *socket_softc = (struct uart_socket_softc *)
|
||||
arg;
|
||||
struct uart_softc *sc = socket_softc->softc;
|
||||
@ -473,7 +473,7 @@ uart_tcp_backend(struct uart_softc *sc, const char *path,
|
||||
* Set the connection softc structure, which includes both the softc
|
||||
* and the drain function provided by the frontend.
|
||||
*/
|
||||
if ((socket_softc = calloc(sizeof(struct uart_socket_softc), 1)) ==
|
||||
if ((socket_softc = calloc(1, sizeof(struct uart_socket_softc))) ==
|
||||
NULL)
|
||||
goto clean;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user