dns/resolved: adjust coding style

This commit is contained in:
Thomas Haller
2016-09-06 14:35:14 +02:00
parent 818023c257
commit 040bf6c1e8
2 changed files with 55 additions and 50 deletions

View File

@@ -1609,10 +1609,11 @@ _resolvconf_resolved_managed (void)
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
NULL, NULL);
if (info && g_file_info_get_is_symlink (info))
if (info && g_file_info_get_is_symlink (info)) {
ret = _nm_utils_strv_find_first ((gchar **) resolved_paths,
G_N_ELEMENTS (resolved_paths),
g_file_info_get_symlink_target (info)) >= 0;
}
g_clear_object(&info);
g_clear_object(&f);

View File

@@ -20,6 +20,7 @@
*/
#include "nm-default.h"
#include "nm-dns-systemd-resolved.h"
#include <stdlib.h>
@@ -139,7 +140,8 @@ static void
update_add_ip6_config (NMDnsSystemdResolved *self,
GVariantBuilder *dns,
GVariantBuilder *domains,
const NMIP6Config *config) {
const NMIP6Config *config)
{
int i;
for (i = 0 ; i < nm_ip6_config_get_num_nameservers (config); i++) {
@@ -170,7 +172,8 @@ static void
update_add_ip4_config (NMDnsSystemdResolved *self,
GVariantBuilder *dns,
GVariantBuilder *domains,
const NMIP4Config *config) {
const NMIP4Config *config)
{
int i;
for (i = 0 ; i < nm_ip4_config_get_num_nameservers (config); i++) {
@@ -288,6 +291,7 @@ update (NMDnsPlugin *plugin,
for (i = 0; i < interfaces->len; i++) {
InterfaceConfig *ic = &g_array_index (interfaces, InterfaceConfig, i);
prepare_one_interface (self, ic);
g_list_free (ic->configs);
}