diff options
| author | Nathaniel McCallum <npmccallum@redhat.com> | 2016-05-24 10:18:43 -0400 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-05-29 14:04:45 +0200 |
| commit | 4bafba06f2b8cc51cd95a725e1c8adf7bbf9a5fc (patch) | |
| tree | 25c3e7a633daac2d6e08a7031580f9d12b0cadf4 /daemons/ipa-slapi-plugins/common | |
| parent | 9cbb54db99eb1855a5c840699072ead9b6d75d04 (diff) | |
| download | freeipa-4bafba06f2b8cc51cd95a725e1c8adf7bbf9a5fc.tar.gz freeipa-4bafba06f2b8cc51cd95a725e1c8adf7bbf9a5fc.tar.xz freeipa-4bafba06f2b8cc51cd95a725e1c8adf7bbf9a5fc.zip | |
Migrate from #ifndef guards to #pragma once
Using a pragma instead of guards is easier to write, less error prone
and avoids name clashes (a source of very subtle bugs). This pragma
is supported on almost all compilers, including all the compilers we
care about: https://en.wikipedia.org/wiki/Pragma_once#Portability.
This patch does not change the autogenerated files: asn1/asn1c/*.h.
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
Diffstat (limited to 'daemons/ipa-slapi-plugins/common')
| -rw-r--r-- | daemons/ipa-slapi-plugins/common/util.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/daemons/ipa-slapi-plugins/common/util.h b/daemons/ipa-slapi-plugins/common/util.h index eb3ddc0b9..1eaf47fac 100644 --- a/daemons/ipa-slapi-plugins/common/util.h +++ b/daemons/ipa-slapi-plugins/common/util.h @@ -34,8 +34,7 @@ * All rights reserved. * END COPYRIGHT BLOCK **/ -#ifndef _SLAPI_PLUGINS_UTIL_H -#define _SLAPI_PLUGINS_UTIL_H +#pragma once #define EOK 0 #define EFAIL -1 @@ -72,5 +71,3 @@ slapi_log_error(SLAPI_LOG_TRACE, log_func, fmt, ##__VA_ARGS__) #define LOG_OOM() LOG_FATAL("Out of Memory!\n") - -#endif /* _SLAPI_PLUGINS_UTIL_H */ |
