Skip to content

Commit 1997544

Browse files
committed
connectors/local: fix conditional line breaks
Problem: the local connector uses a line break style in conditionals that is inconsistent with the coding style of most of the flux-core code base. Ensure there is a line break after an "if" block's closing brace, before "else". When multi-part conditional expressions are broken across lines, indent the second condition 4 spaces from the first.
1 parent cebabb1 commit 1997544

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/connectors/local/local.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int op_send (void *impl, const flux_msg_t *msg, int flags)
7777
struct local_connector *ctx = impl;
7878

7979
if (ctx->testing_userid != FLUX_USERID_UNKNOWN
80-
|| ctx->testing_rolemask != FLUX_ROLE_NONE)
80+
|| ctx->testing_rolemask != FLUX_ROLE_NONE)
8181
return send_testing (ctx, msg, flags);
8282

8383
return usock_client_send (ctx->uclient, msg, flags);
@@ -104,14 +104,16 @@ static int op_setopt (void *impl, const char *option,
104104
goto done;
105105
}
106106
memcpy (&ctx->testing_userid, val, val_size);
107-
} else if (option && !strcmp (option, FLUX_OPT_TESTING_ROLEMASK)) {
107+
}
108+
else if (option && !strcmp (option, FLUX_OPT_TESTING_ROLEMASK)) {
108109
val_size = sizeof (ctx->testing_rolemask);
109110
if (size != val_size) {
110111
errno = EINVAL;
111112
goto done;
112113
}
113114
memcpy (&ctx->testing_rolemask, val, val_size);
114-
} else {
115+
}
116+
else {
115117
errno = EINVAL;
116118
goto done;
117119
}
@@ -134,7 +136,8 @@ static int op_getopt (void *impl, const char *option,
134136
goto done;
135137
}
136138
memcpy (val, &ctx->owner, val_size);
137-
} else {
139+
}
140+
else {
138141
errno = EINVAL;
139142
goto done;
140143
}

0 commit comments

Comments
 (0)