From 3ccf73bfd6f87d7be1a156d276c22a81d1fac6b4 Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Wed, 31 Jul 2019 18:20:34 -0400 Subject: [PATCH] Make the coding style explicit Signed-off-by: Robbie Harwood Reviewed-By: Alexander Bokovoy --- daemons/ipa-kdb/README | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/daemons/ipa-kdb/README b/daemons/ipa-kdb/README index b0786853b..4075082ee 100644 --- a/daemons/ipa-kdb/README +++ b/daemons/ipa-kdb/README @@ -1 +1,19 @@ This is the ipa krb5kdc database backend. + +As the KDB interfaces heavily with krb5, we inherit its code style as well. +However, note the following changes: + +- no modelines (and different file preamble) +- return types don't require their own line +- single-statement blocks may optionally be braced +- /* and */ do not ever get their own line +- C99 for-loops are permitted (and encouraged) +- a restricted set of other C99 features are permitted + +In particular, variable-length arrays, flexible array members, compound +literals, universal character names, and //-style comments are not permitted. + +Use of regular malloc/free is preferred over talloc for new code. + +By and large, existing code mostly conforms to these requirements. New code +must conform to them.