diff options
author | Caleb Maclennan <caleb@alerque.com> | 2022-03-18 17:54:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-18 17:54:11 +0300 |
commit | 6952262e6a1315b14935ddd0ea511c202c0154ba (patch) | |
tree | 18707ede335bcd61002de1cc8c7398fd7d02eafb /src/wsocket.c | |
parent | d9cc531e3bc62cfe7965c8cb3df7b1d510f3f4a2 (diff) | |
download | luasocket-6952262e6a1315b14935ddd0ea511c202c0154ba.tar.gz luasocket-6952262e6a1315b14935ddd0ea511c202c0154ba.tar.bz2 luasocket-6952262e6a1315b14935ddd0ea511c202c0154ba.zip |
style: Use C-style comment syntax throughout (#309)
Co-authored-by: Denise Cullassnekuff <19711487+BlackCutpoint@users.noreply.github.com>
Diffstat (limited to 'src/wsocket.c')
-rwxr-xr-x | src/wsocket.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index 20da330..7cd4115 100755 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
@@ -360,7 +360,7 @@ const char *socket_ioerror(p_socket ps, int err) { | |||
360 | static const char *wstrerror(int err) { | 360 | static const char *wstrerror(int err) { |
361 | switch (err) { | 361 | switch (err) { |
362 | case WSAEINTR: return "Interrupted function call"; | 362 | case WSAEINTR: return "Interrupted function call"; |
363 | case WSAEACCES: return PIE_ACCESS; // "Permission denied"; | 363 | case WSAEACCES: return PIE_ACCESS; /* "Permission denied"; */ |
364 | case WSAEFAULT: return "Bad address"; | 364 | case WSAEFAULT: return "Bad address"; |
365 | case WSAEINVAL: return "Invalid argument"; | 365 | case WSAEINVAL: return "Invalid argument"; |
366 | case WSAEMFILE: return "Too many open files"; | 366 | case WSAEMFILE: return "Too many open files"; |
@@ -373,23 +373,23 @@ static const char *wstrerror(int err) { | |||
373 | case WSAEPROTOTYPE: return "Protocol wrong type for socket"; | 373 | case WSAEPROTOTYPE: return "Protocol wrong type for socket"; |
374 | case WSAENOPROTOOPT: return "Bad protocol option"; | 374 | case WSAENOPROTOOPT: return "Bad protocol option"; |
375 | case WSAEPROTONOSUPPORT: return "Protocol not supported"; | 375 | case WSAEPROTONOSUPPORT: return "Protocol not supported"; |
376 | case WSAESOCKTNOSUPPORT: return PIE_SOCKTYPE; // "Socket type not supported"; | 376 | case WSAESOCKTNOSUPPORT: return PIE_SOCKTYPE; /* "Socket type not supported"; */ |
377 | case WSAEOPNOTSUPP: return "Operation not supported"; | 377 | case WSAEOPNOTSUPP: return "Operation not supported"; |
378 | case WSAEPFNOSUPPORT: return "Protocol family not supported"; | 378 | case WSAEPFNOSUPPORT: return "Protocol family not supported"; |
379 | case WSAEAFNOSUPPORT: return PIE_FAMILY; // "Address family not supported by protocol family"; | 379 | case WSAEAFNOSUPPORT: return PIE_FAMILY; /* "Address family not supported by protocol family"; */ |
380 | case WSAEADDRINUSE: return PIE_ADDRINUSE; // "Address already in use"; | 380 | case WSAEADDRINUSE: return PIE_ADDRINUSE; /* "Address already in use"; */ |
381 | case WSAEADDRNOTAVAIL: return "Cannot assign requested address"; | 381 | case WSAEADDRNOTAVAIL: return "Cannot assign requested address"; |
382 | case WSAENETDOWN: return "Network is down"; | 382 | case WSAENETDOWN: return "Network is down"; |
383 | case WSAENETUNREACH: return "Network is unreachable"; | 383 | case WSAENETUNREACH: return "Network is unreachable"; |
384 | case WSAENETRESET: return "Network dropped connection on reset"; | 384 | case WSAENETRESET: return "Network dropped connection on reset"; |
385 | case WSAECONNABORTED: return "Software caused connection abort"; | 385 | case WSAECONNABORTED: return "Software caused connection abort"; |
386 | case WSAECONNRESET: return PIE_CONNRESET; // "Connection reset by peer"; | 386 | case WSAECONNRESET: return PIE_CONNRESET; /* "Connection reset by peer"; */ |
387 | case WSAENOBUFS: return "No buffer space available"; | 387 | case WSAENOBUFS: return "No buffer space available"; |
388 | case WSAEISCONN: return PIE_ISCONN; // "Socket is already connected"; | 388 | case WSAEISCONN: return PIE_ISCONN; /* "Socket is already connected"; */ |
389 | case WSAENOTCONN: return "Socket is not connected"; | 389 | case WSAENOTCONN: return "Socket is not connected"; |
390 | case WSAESHUTDOWN: return "Cannot send after socket shutdown"; | 390 | case WSAESHUTDOWN: return "Cannot send after socket shutdown"; |
391 | case WSAETIMEDOUT: return PIE_TIMEDOUT; // "Connection timed out"; | 391 | case WSAETIMEDOUT: return PIE_TIMEDOUT; /* "Connection timed out"; */ |
392 | case WSAECONNREFUSED: return PIE_CONNREFUSED; // "Connection refused"; | 392 | case WSAECONNREFUSED: return PIE_CONNREFUSED; /* "Connection refused"; */ |
393 | case WSAEHOSTDOWN: return "Host is down"; | 393 | case WSAEHOSTDOWN: return "Host is down"; |
394 | case WSAEHOSTUNREACH: return "No route to host"; | 394 | case WSAEHOSTUNREACH: return "No route to host"; |
395 | case WSAEPROCLIM: return "Too many processes"; | 395 | case WSAEPROCLIM: return "Too many processes"; |
@@ -398,9 +398,9 @@ static const char *wstrerror(int err) { | |||
398 | case WSANOTINITIALISED: | 398 | case WSANOTINITIALISED: |
399 | return "Successful WSAStartup not yet performed"; | 399 | return "Successful WSAStartup not yet performed"; |
400 | case WSAEDISCON: return "Graceful shutdown in progress"; | 400 | case WSAEDISCON: return "Graceful shutdown in progress"; |
401 | case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; // "Host not found"; | 401 | case WSAHOST_NOT_FOUND: return PIE_HOST_NOT_FOUND; /* "Host not found"; */ |
402 | case WSATRY_AGAIN: return "Nonauthoritative host not found"; | 402 | case WSATRY_AGAIN: return "Nonauthoritative host not found"; |
403 | case WSANO_RECOVERY: return PIE_FAIL; // "Nonrecoverable name lookup error"; | 403 | case WSANO_RECOVERY: return PIE_FAIL; /* "Nonrecoverable name lookup error"; */ |
404 | case WSANO_DATA: return "Valid name, no data record of requested type"; | 404 | case WSANO_DATA: return "Valid name, no data record of requested type"; |
405 | default: return "Unknown error"; | 405 | default: return "Unknown error"; |
406 | } | 406 | } |