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>
This commit is contained in:
Nathaniel McCallum
2016-05-24 10:18:43 -04:00
committed by Martin Basti
parent 9cbb54db99
commit 4bafba06f2
14 changed files with 14 additions and 54 deletions

View File

@@ -1,5 +1,4 @@
#ifndef __IPA_ASN1_H_
#define __IPA_ASN1_H_
#pragma once
#include "ipa_krb5.h"
@@ -72,5 +71,3 @@ bool ipaasn1_dec_getkt(void *buf, size_t len, bool *newkt,
*/
bool ipaasn1_dec_getktreply(void *buf, size_t len,
int *kvno, struct keys_container *keys);
#endif /* __IPA_ASN1_H_ */