'make style' and align some #preprocessor directives

This commit is contained in:
Romuald Conty 2013-02-19 00:38:55 +01:00
parent ef5c39bd7b
commit 1e16795341
4 changed files with 15 additions and 16 deletions

View file

@ -25,12 +25,12 @@
*/ */
#ifndef __NFC_TYPES_H__ #ifndef __NFC_TYPES_H__
# define __NFC_TYPES_H__ #define __NFC_TYPES_H__
# include <stddef.h> #include <stddef.h>
# include <stdint.h> #include <stdint.h>
# include <stdbool.h> #include <stdbool.h>
# include <stdio.h> #include <stdio.h>
#ifndef NFC_BUFSIZE_CONNSTRING #ifndef NFC_BUFSIZE_CONNSTRING
#define NFC_BUFSIZE_CONNSTRING 1024 #define NFC_BUFSIZE_CONNSTRING 1024

View file

@ -25,10 +25,10 @@
*/ */
#ifndef __NFC_DRIVERS_H__ #ifndef __NFC_DRIVERS_H__
# define __NFC_DRIVERS_H__ #define __NFC_DRIVERS_H__
# include <nfc/nfc-types.h> #include <nfc/nfc-types.h>
extern const struct nfc_driver_list* nfc_drivers; extern const struct nfc_driver_list *nfc_drivers;
#endif // __NFC_DRIVERS_H__ #endif // __NFC_DRIVERS_H__

View file

@ -3,7 +3,7 @@
* *
* Copyright (C) 2009, 2010 Roel Verdult * Copyright (C) 2009, 2010 Roel Verdult
* Copyright (C) 2010, 2011 Romain Tartière * 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 * 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 * 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_CATEGORY "libnfc.general"
#define LOG_GROUP NFC_LOG_GROUP_GENERAL #define LOG_GROUP NFC_LOG_GROUP_GENERAL
struct nfc_driver_list struct nfc_driver_list {
{ const struct nfc_driver_list *next;
const struct nfc_driver_list *next; const struct nfc_driver *driver;
const struct nfc_driver *driver;
}; };
const struct nfc_driver_list* nfc_drivers = NULL; const struct nfc_driver_list *nfc_drivers = NULL;
static void static void
nfc_drivers_init() nfc_drivers_init()
@ -153,7 +152,7 @@ nfc_register_driver(const struct nfc_driver *ndr)
if (!ndr) if (!ndr)
return NFC_EINVARG; 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) if (!pndl)
return NFC_ESOFT; return NFC_ESOFT;

View file

@ -56,7 +56,7 @@
#include "nfc-utils.h" #include "nfc-utils.h"
#if defined(WIN32) && defined(__GNUC__) /* mingw compiler */ #if defined(WIN32) && defined(__GNUC__) /* mingw compiler */
#include <getopt.h> #include <getopt.h>
#endif #endif
static nfc_device *pnd; static nfc_device *pnd;