diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-14 18:28:35 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-14 18:28:35 -0600 |
commit | d40369b0e09e4e2228ebff305067ec2d99220848 (patch) | |
tree | 0839bc088f3f0b577e0badddab745fa9f3c94dd4 /libgcompat/resolv.c | |
parent | 28748009c0dc553e2fe5e6253e7615cf89d2b7ef (diff) | |
download | gcompat-d40369b0e09e4e2228ebff305067ec2d99220848.tar.gz gcompat-d40369b0e09e4e2228ebff305067ec2d99220848.tar.bz2 gcompat-d40369b0e09e4e2228ebff305067ec2d99220848.tar.xz gcompat-d40369b0e09e4e2228ebff305067ec2d99220848.zip |
global: Format the code consistently
* Apply clang-format.
* Change all comments to the same style.
* Add braces as dictated by the coding style guidelines.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'libgcompat/resolv.c')
-rw-r--r-- | libgcompat/resolv.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libgcompat/resolv.c b/libgcompat/resolv.c index 9ded8c9..3566dcd 100644 --- a/libgcompat/resolv.c +++ b/libgcompat/resolv.c @@ -6,8 +6,8 @@ * Note: res_init() is actually deprecated according to * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html **************************************************************************/ -#include <string.h> /* memcpy, memset */ -#include <resolv.h> /* res_state */ +#include <resolv.h> /* res_state */ +#include <string.h> /* memcpy, memset */ static inline int res_ninit(res_state statp) { @@ -20,13 +20,16 @@ static inline int res_ninit(res_state statp) static inline int res_nclose(res_state statp) { - if (!statp) + if (!statp) { return -1; + } if (statp != &_res) { memset(statp, 0, sizeof(*statp)); } return 0; } -extern __typeof(res_ninit) __res_ninit __attribute__((weak, alias("res_ninit"))); -extern __typeof(res_nclose) __res_nclose __attribute__((weak, alias("res_nclose"))); +extern __typeof(res_ninit) __res_ninit + __attribute__((weak, alias("res_ninit"))); +extern __typeof(res_nclose) __res_nclose + __attribute__((weak, alias("res_nclose"))); |