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/free.c | |
| parent | 99283972fe3a74d3a1dea12c4099f76286130a67 (diff) | |
| parent | a71ce153082565e5728424749475593dc0623492 (diff) | |
| download | monitoring-plugins-1113bbcd92d85b85579aa7feef511241e58fb0f5.tar.gz | |
merged with mastercheck_snmp_fixes
Diffstat (limited to 'gl/free.c')
| -rw-r--r-- | gl/free.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Make free() preserve errno. | 1 | /* Make free() preserve errno. |
| 2 | 2 | ||
| 3 | Copyright (C) 2003, 2006, 2009-2025 Free Software Foundation, Inc. | 3 | Copyright (C) 2003, 2006, 2009-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 |
| @@ -33,7 +33,7 @@ rpl_free (void *p) | |||
| 33 | { | 33 | { |
| 34 | # if defined __GNUC__ && !defined __clang__ | 34 | # if defined __GNUC__ && !defined __clang__ |
| 35 | /* An invalid GCC optimization | 35 | /* An invalid GCC optimization |
| 36 | <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98396> | 36 | <https://gcc.gnu.org/PR98396> |
| 37 | would optimize away the assignments in the code below, when link-time | 37 | would optimize away the assignments in the code below, when link-time |
| 38 | optimization (LTO) is enabled. Make the code more complicated, so that | 38 | optimization (LTO) is enabled. Make the code more complicated, so that |
| 39 | GCC does not grok how to optimize it. */ | 39 | GCC does not grok how to optimize it. */ |
| @@ -44,9 +44,9 @@ rpl_free (void *p) | |||
| 44 | free (p); | 44 | free (p); |
| 45 | errno = err[errno == 0]; | 45 | errno = err[errno == 0]; |
| 46 | # else | 46 | # else |
| 47 | int err = errno; | 47 | int saved_errno = errno; |
| 48 | free (p); | 48 | free (p); |
| 49 | errno = err; | 49 | errno = saved_errno; |
| 50 | # endif | 50 | # endif |
| 51 | } | 51 | } |
| 52 | 52 | ||
