diff options
Diffstat (limited to 'gl/gethostname.c')
| -rw-r--r-- | gl/gethostname.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gl/gethostname.c b/gl/gethostname.c index 8f0ceafc..464bac39 100644 --- a/gl/gethostname.c +++ b/gl/gethostname.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* gethostname emulation for SysV and POSIX.1. | 1 | /* gethostname emulation for SysV and POSIX.1. |
| 2 | 2 | ||
| 3 | Copyright (C) 1992, 2003, 2006, 2008-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 1992, 2003, 2006, 2008-2026 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -89,12 +89,10 @@ gethostname (char *name, size_t len) | |||
| 89 | int | 89 | int |
| 90 | rpl_gethostname (char *name, size_t len) | 90 | rpl_gethostname (char *name, size_t len) |
| 91 | { | 91 | { |
| 92 | int r; | ||
| 93 | |||
| 94 | if (len > INT_MAX) | 92 | if (len > INT_MAX) |
| 95 | len = INT_MAX; | 93 | len = INT_MAX; |
| 96 | gl_sockets_startup (SOCKETS_1_1); | 94 | gl_sockets_startup (SOCKETS_1_1); |
| 97 | r = gethostname (name, (int) len); | 95 | int r = gethostname (name, (int) len); |
| 98 | if (r < 0) | 96 | if (r < 0) |
| 99 | set_winsock_errno (); | 97 | set_winsock_errno (); |
| 100 | 98 | ||
