diff options
| author | Andreas Baumann <mail@andreasbaumann.cc> | 2026-03-27 11:14:20 +0100 |
|---|---|---|
| committer | Andreas Baumann <mail@andreasbaumann.cc> | 2026-03-27 11:14:20 +0100 |
| commit | 1113bbcd92d85b85579aa7feef511241e58fb0f5 (patch) | |
| tree | d69b7bcfe2f7e80fda9a1f4ddd38209d6cb7aaf0 /gl/gethostname.c | |
| parent | 99283972fe3a74d3a1dea12c4099f76286130a67 (diff) | |
| parent | a71ce153082565e5728424749475593dc0623492 (diff) | |
| download | monitoring-plugins-1113bbcd92d85b85579aa7feef511241e58fb0f5.tar.gz | |
merged with mastercheck_snmp_fixes
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 | ||
