1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 08:20:27 +00:00

Merge pull request #827 from sogaiu/tweak-format-strings

Tweak format strings
This commit is contained in:
Calvin Rose 2021-10-06 17:48:53 -05:00 committed by GitHub
commit 79807bf2ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -699,7 +699,7 @@ JANET_CORE_FN(cfun_net_getsockname,
socklen_t slen = sizeof(ss);
memset(&ss, 0, 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");
return janet_so_getname(&ss);
@ -714,7 +714,7 @@ JANET_CORE_FN(cfun_net_getpeername,
socklen_t slen = sizeof(ss);
memset(&ss, 0, 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");
return janet_so_getname(&ss);