From 1e167953418d31c2fba5eb21bb6d3d277630a15d Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 19 Feb 2013 00:38:55 +0100 Subject: [PATCH] 'make style' and align some #preprocessor directives --- include/nfc/nfc-types.h | 10 +++++----- libnfc/drivers.h | 6 +++--- libnfc/nfc.c | 13 ++++++------- utils/nfc-read-forum-tag3.c | 2 +- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/nfc/nfc-types.h b/include/nfc/nfc-types.h index f3a6891..71326e8 100644 --- a/include/nfc/nfc-types.h +++ b/include/nfc/nfc-types.h @@ -25,12 +25,12 @@ */ #ifndef __NFC_TYPES_H__ -# define __NFC_TYPES_H__ +#define __NFC_TYPES_H__ -# include -# include -# include -# include +#include +#include +#include +#include #ifndef NFC_BUFSIZE_CONNSTRING #define NFC_BUFSIZE_CONNSTRING 1024 diff --git a/libnfc/drivers.h b/libnfc/drivers.h index 76ed41f..ac333ed 100644 --- a/libnfc/drivers.h +++ b/libnfc/drivers.h @@ -25,10 +25,10 @@ */ #ifndef __NFC_DRIVERS_H__ -# define __NFC_DRIVERS_H__ +#define __NFC_DRIVERS_H__ -# include +#include -extern const struct nfc_driver_list* nfc_drivers; +extern const struct nfc_driver_list *nfc_drivers; #endif // __NFC_DRIVERS_H__ diff --git a/libnfc/nfc.c b/libnfc/nfc.c index 0f9cf97..6bc84dd 100644 --- a/libnfc/nfc.c +++ b/libnfc/nfc.c @@ -3,7 +3,7 @@ * * Copyright (C) 2009, 2010 Roel Verdult * Copyright (C) 2010, 2011 Romain Tartière - * Copyright (C) 2009, 2010, 2011, 2012 Romuald Conty + * Copyright (C) 2009, 2010, 2011, 2012, 2013 Romuald Conty * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the @@ -109,13 +109,12 @@ #define LOG_CATEGORY "libnfc.general" #define LOG_GROUP NFC_LOG_GROUP_GENERAL -struct nfc_driver_list -{ - const struct nfc_driver_list *next; - const struct nfc_driver *driver; +struct nfc_driver_list { + const struct nfc_driver_list *next; + const struct nfc_driver *driver; }; -const struct nfc_driver_list* nfc_drivers = NULL; +const struct nfc_driver_list *nfc_drivers = NULL; static void nfc_drivers_init() @@ -153,7 +152,7 @@ nfc_register_driver(const struct nfc_driver *ndr) if (!ndr) return NFC_EINVARG; - struct nfc_driver_list *pndl = (struct nfc_driver_list*)malloc(sizeof(struct nfc_driver_list)); + struct nfc_driver_list *pndl = (struct nfc_driver_list *)malloc(sizeof(struct nfc_driver_list)); if (!pndl) return NFC_ESOFT; diff --git a/utils/nfc-read-forum-tag3.c b/utils/nfc-read-forum-tag3.c index c935e20..5dd479e 100644 --- a/utils/nfc-read-forum-tag3.c +++ b/utils/nfc-read-forum-tag3.c @@ -56,7 +56,7 @@ #include "nfc-utils.h" #if defined(WIN32) && defined(__GNUC__) /* mingw compiler */ - #include +#include #endif static nfc_device *pnd;