1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 01:37:19 +00:00

Tweak format strings

This commit is contained in:
sogaiu 2021-10-06 20:34:33 +09:00
parent fbe067823e
commit eae18ce973

View File

@ -699,7 +699,7 @@ JANET_CORE_FN(cfun_net_getsockname,
socklen_t slen = sizeof(ss); socklen_t slen = sizeof(ss);
memset(&ss, 0, slen); memset(&ss, 0, slen);
if (getsockname((JSock)js->handle, (struct sockaddr *) &ss, &slen)) { if (getsockname((JSock)js->handle, (struct sockaddr *) &ss, &slen)) {
janet_panicf("Failed to get localname on %v: %s", argv[0], janet_ev_lasterr()); janet_panicf("Failed to get localname on %v: %V", argv[0], janet_ev_lasterr());
} }
janet_assert(slen <= sizeof(ss), "socket address truncated"); janet_assert(slen <= sizeof(ss), "socket address truncated");
return janet_so_getname(&ss); return janet_so_getname(&ss);
@ -714,7 +714,7 @@ JANET_CORE_FN(cfun_net_getpeername,
socklen_t slen = sizeof(ss); socklen_t slen = sizeof(ss);
memset(&ss, 0, slen); memset(&ss, 0, slen);
if (getpeername((JSock)js->handle, (struct sockaddr *)&ss, &slen)) { if (getpeername((JSock)js->handle, (struct sockaddr *)&ss, &slen)) {
janet_panicf("Failed to get peername on %v: %s", argv[0], janet_ev_lasterr()); janet_panicf("Failed to get peername on %v: %V", argv[0], janet_ev_lasterr());
} }
janet_assert(slen <= sizeof(ss), "socket address truncated"); janet_assert(slen <= sizeof(ss), "socket address truncated");
return janet_so_getname(&ss); return janet_so_getname(&ss);