wifi: Add wifi pointer NULL checks
[framework/connectivity/connman.git] / include / log.h
index c48ad9d..2a7de10 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007-2009  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2012  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -65,11 +65,11 @@ struct connman_debug_desc {
  * name it is called in.
  */
 #define DBG(fmt, arg...) do { \
-       static struct connman_debug_desc desc \
+       static struct connman_debug_desc __connman_debug_desc \
        __attribute__((used, section("__debug"), aligned(8))) = { \
                .file = __FILE__, .flags = CONNMAN_DEBUG_FLAG_DEFAULT, \
        }; \
-       if (desc.flags & CONNMAN_DEBUG_FLAG_PRINT) \
+       if (__connman_debug_desc.flags & CONNMAN_DEBUG_FLAG_PRINT) \
                connman_debug("%s:%s() " fmt, \
                                        __FILE__, __FUNCTION__ , ## arg); \
 } while (0)