diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-15 04:22:57 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-15 05:19:08 -0500 |
commit | 71cdb52799220f8d9052643baf1d3e9836a9c755 (patch) | |
tree | 27aee97a35d9ab51f0d8f64a46690bd41a5f8c1b /gl/open-safer.c | |
parent | f7afa46586645e50498d8b2d0c67884f014dc3a4 (diff) | |
download | monitoring-plugins-71cdb52799220f8d9052643baf1d3e9836a9c755.tar.gz |
Sync with gnulib
Diffstat (limited to 'gl/open-safer.c')
-rw-r--r-- | gl/open-safer.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gl/open-safer.c b/gl/open-safer.c index ce493d5e..15bf6a65 100644 --- a/gl/open-safer.c +++ b/gl/open-safer.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* Invoke open, but avoid some glitches. | 1 | /* Invoke open, but avoid some glitches. |
2 | 2 | ||
3 | Copyright (C) 2005, 2006 Free Software Foundation, Inc. | 3 | Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc. |
4 | 4 | ||
5 | This program is free software: you can redistribute it and/or modify | 5 | This program is free software: you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
@@ -38,9 +38,10 @@ open_safer (char const *file, int flags, ...) | |||
38 | /* Assume mode_t promotes to int if and only if it is smaller. | 38 | /* Assume mode_t promotes to int if and only if it is smaller. |
39 | This assumption isn't guaranteed by the C standard, but we | 39 | This assumption isn't guaranteed by the C standard, but we |
40 | don't know of any real-world counterexamples. */ | 40 | don't know of any real-world counterexamples. */ |
41 | mode = (sizeof (mode_t) < sizeof (int) | 41 | if (sizeof (mode_t) < sizeof (int)) |
42 | ? va_arg (ap, int) | 42 | mode = va_arg (ap, int); |
43 | : va_arg (ap, mode_t)); | 43 | else |
44 | mode = va_arg (ap, mode_t); | ||
44 | 45 | ||
45 | va_end (ap); | 46 | va_end (ap); |
46 | } | 47 | } |