Skip to content

Commit 1ab7d30

Browse files
committed
code style check and fix
1 parent 2887dd5 commit 1ab7d30

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

kubernetes/config/kube_config_yaml.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ mapping :: = MAPPING - START(node node) * MAPPING - END
5757

5858
#define VALUE_TRUE_LOWERCASE_STRING "true"
5959

60-
static char *load_file_content(const char *path) {
60+
static char *load_file_content(const char *path)
61+
{
6162

6263
static char fname[] = "load_file_content()";
6364

@@ -73,8 +74,7 @@ static char *load_file_content(const char *path) {
7374
long s = ftell(fh);
7475
rewind(fh);
7576
buffer = malloc(s);
76-
if ( buffer != NULL )
77-
{
77+
if (buffer != NULL) {
7878
fread(buffer, s, 1, fh);
7979
}
8080
fclose(fh);
@@ -217,7 +217,7 @@ static int parse_kubeconfig_yaml_property_mapping(kubeconfig_property_t * proper
217217
} else if (0 == strcmp(key->data.scalar.value, KEY_SERVER)) {
218218
property->server = strdup(value->data.scalar.value);
219219
} else if (0 == strcmp(key->data.scalar.value, KEY_INSECURE_SKIP_TLS_VERIFY)) {
220-
property->insecure_skip_tls_verify = (0 == strcmp(value->data.scalar.value, VALUE_TRUE_LOWERCASE_STRING)); //libyaml fails to parse true, but it can parse "true"!
220+
property->insecure_skip_tls_verify = (0 == strcmp(value->data.scalar.value, VALUE_TRUE_LOWERCASE_STRING)); //libyaml fails to parse true, but it can parse "true"!
221221
}
222222
} else if (KUBECONFIG_PROPERTY_TYPE_USER == property->type) {
223223
if (0 == strcmp(key->data.scalar.value, KEY_CLIENT_CERTIFICATE)) {
@@ -1119,4 +1119,3 @@ int kubeyaml_save_kubeconfig(const kubeconfig_t * kubeconfig)
11191119

11201120
return -1;
11211121
}
1122-

0 commit comments

Comments
 (0)