Fix printf argument order

Correct the argument order passed to the printf-like function
to match the format string "expected %d, received %d".

Signed-off-by: Grigory Trenin <grigory.trenin@gmail.com>
This commit is contained in:
Grigory Trenin
2025-11-06 16:54:42 -05:00
parent 284f2ecde5
commit 093051ea5f

View File

@@ -430,7 +430,7 @@ int forward_msg(void *pool, int ifd, uint8_t icmd, int ofd, uint8_t ocmd,
if (rcmd != icmd) {
oc_syslog(LOG_ERR, "%s:%u: expected %d, received %d", __FILE__,
__LINE__, (int)rcmd, (int)icmd);
__LINE__, (int)icmd, (int)rcmd);
return ERR_BAD_COMMAND;
}
@@ -726,7 +726,7 @@ int recv_socket_msg(void *pool, int fd, uint8_t cmd, int *socketfd, void **msg,
if (rcmd != cmd) {
oc_syslog(LOG_ERR, "%s:%u: expected %d, received %d", __FILE__,
__LINE__, (int)rcmd, (int)cmd);
__LINE__, (int)cmd, (int)rcmd);
return ERR_BAD_COMMAND;
}