all: minor coding style fixes (space before parentheses)

This commit is contained in:
Thomas Haller 2019-02-11 15:22:38 +01:00
parent 3a0f7114fe
commit 65884733ec
5 changed files with 14 additions and 14 deletions

View file

@ -3306,7 +3306,7 @@ get_valid_properties_string (const NMMetaSettingValidPartItem *const*array,
str = g_string_sized_new (1024);
for (i = 0; i < 2; i++, iter = array_slv) {
for(; !full_match && iter && *iter; iter++) {
for (; !full_match && iter && *iter; iter++) {
const NMMetaSettingInfoEditor *setting_info = (*iter)->setting_info;
if ( !(g_str_has_prefix (setting_info->general->setting_name, prefix))

View file

@ -34,11 +34,11 @@
/* Added in Jansson v2.8 */
#ifndef json_object_foreach_safe
#define json_object_foreach_safe(object, n, key, value) \
for(key = json_object_iter_key(json_object_iter(object)), \
n = json_object_iter_next(object, json_object_key_to_iter(key)); \
key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
key = json_object_iter_key(n), \
n = json_object_iter_next(object, json_object_key_to_iter(key)))
for (key = json_object_iter_key(json_object_iter(object)), \
n = json_object_iter_next(object, json_object_key_to_iter(key)); \
key && (value = json_object_iter_value(json_object_key_to_iter(key))); \
key = json_object_iter_key(n), \
n = json_object_iter_next(object, json_object_key_to_iter(key)))
#endif
#endif /* WITH_JANSON */

View file

@ -30,8 +30,8 @@
static inline NMLogLevel
_slog_level_to_nm (int slevel)
{
switch (LOG_PRI (slevel)) {
case LOG_DEBUG: return LOGL_DEBUG;
switch (LOG_PRI (slevel)) {
case LOG_DEBUG: return LOGL_DEBUG;
case LOG_WARNING: return LOGL_WARN;
case LOG_CRIT:
case LOG_ERR: return LOGL_ERR;

View file

@ -206,16 +206,16 @@ nla_put_uint32 (struct nl_msg *msg, int attrtype, uint32_t val)
}
#define NLA_PUT(msg, attrtype, attrlen, data) \
do { \
G_STMT_START { \
if (nla_put(msg, attrtype, attrlen, data) < 0) \
goto nla_put_failure; \
} while(0)
} G_STMT_END
#define NLA_PUT_TYPE(msg, type, attrtype, value) \
do { \
G_STMT_START { \
type __nla_tmp = value; \
NLA_PUT(msg, attrtype, sizeof(type), &__nla_tmp); \
} while(0)
} G_STMT_END
#define NLA_PUT_U8(msg, attrtype, value) \
NLA_PUT_TYPE(msg, uint8_t, attrtype, value)

View file

@ -63,7 +63,7 @@ _ifupdownplugin_guess_connection_type (if_block *block)
{
const char *ret_type = NULL;
if(nm_streq0 (ifparser_getkey (block, "inet"), "ppp"))
if (nm_streq0 (ifparser_getkey (block, "inet"), "ppp"))
ret_type = NM_SETTING_PPP_SETTING_NAME;
else {
if_data *ifb;
@ -75,7 +75,7 @@ _ifupdownplugin_guess_connection_type (if_block *block)
break;
}
}
if(!ret_type)
if (!ret_type)
ret_type = NM_SETTING_WIRED_SETTING_NAME;
}