NetworkManager/src/devices/nm-device-ethernet-utils.c
Thomas Haller 88071abb43
all: unify comment style for SPDX-License-Identifier tag
Our coding style recommends C style comments (/* */) instead of C++
(//). Also, systemd (which we partly fork) uses C style comments for
the SPDX-License-Identifier.

Unify the style.

  $ sed -i '1 s#// SPDX-License-Identifier: \([^ ]\+\)$#/* SPDX-License-Identifier: \1 */#' -- $(git ls-files -- '*.[hc]' '*.[hc]pp')
2020-09-29 16:50:53 +02:00

26 lines
607 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2011 Red Hat, Inc.
*/
#include "nm-default.h"
#include "nm-device-ethernet-utils.h"
#include "settings/nm-settings-connection.h"
char *
nm_device_ethernet_utils_get_default_wired_name(GHashTable *existing_ids)
{
char *temp;
int i;
/* Find the next available unique connection name */
for (i = 1; i < G_MAXINT; i++) {
temp = g_strdup_printf(_("Wired connection %d"), i);
if (!existing_ids || !g_hash_table_contains(existing_ids, temp))
return temp;
g_free(temp);
}
return NULL;
}