From 6e9d3f8253113756bbb67fa3964921952fa9ec63 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 22 Apr 2021 04:54:14 +0300 Subject: [PATCH 41/44] Improve comments about mapping Winsock errors to errno - Correct set_socket_errno() comment to point to net_types.h where the mapping currently lives - Add cross-reference comment to net_types.h about set_socket_errno() See osdn #42045 Signed-off-by: Marko Lindqvist --- utility/net_types.h | 5 +++-- utility/netintf.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/utility/net_types.h b/utility/net_types.h index 431f3bea8b..2c77e8e9af 100644 --- a/utility/net_types.h +++ b/utility/net_types.h @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,8 @@ extern "C" { /* gen_headers */ #include "freeciv_config.h" -/* map symbolic Winsock error names to symbolic errno names */ +/* Map symbolic Winsock error names to symbolic errno names. + * Update also set_socket_errno() when changing this. */ #ifdef FREECIV_HAVE_WINSOCK #undef EINTR #undef EINPROGRESS diff --git a/utility/netintf.c b/utility/netintf.c index c2c5d024b1..e74fef5d5e 100644 --- a/utility/netintf.c +++ b/utility/netintf.c @@ -79,7 +79,7 @@ static void set_socket_errno(void) int err = WSAGetLastError(); switch (err) { - /* these have mappings to symbolic errno names in netintf.h */ + /* these have mappings to symbolic errno names in net_types.h */ case WSAEINTR: case WSAEWOULDBLOCK: case WSAECONNRESET: -- 2.30.2