Skip to content

Commit 3a74565

Browse files
committed
evalfunction.c: Removed trailing whitespace
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent fa6ca86 commit 3a74565

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

libpromises/evalfunction.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
975975
assert(fp != NULL);
976976
bool allocated = false;
977977
JsonElement *json = VarNameOrInlineToJson(ctx, fp, finalargs, false, &allocated);
978-
978+
979979
// we failed to produce a valid JsonElement, so give up
980980
if (json == NULL)
981981
{
@@ -990,7 +990,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
990990
JsonDestroyMaybe(json, allocated);
991991
return FnFailure();
992992
}
993-
993+
994994
JsonElement *parent = JsonObjectCreate(10);
995995
setpwent();
996996
struct passwd *pw;
@@ -1035,7 +1035,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10351035
{
10361036
char uid_string[PRINTSIZE(pw->pw_uid)];
10371037
int ret = snprintf(uid_string, sizeof(uid_string), "%u", pw->pw_uid);
1038-
1038+
10391039
if (ret < 0)
10401040
{
10411041
Log(LOG_LEVEL_ERR, "Couldn't convert the uid of '%s' to string in function '%s'",
@@ -1067,7 +1067,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10671067
assert((size_t) ret < sizeof(gid_string));
10681068

10691069
if (!StringMatchFull(value, gid_string))
1070-
{
1070+
{
10711071
can_add_to_json = false;
10721072
}
10731073
}
@@ -1092,13 +1092,13 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10921092
can_add_to_json = false;
10931093
}
10941094
}
1095-
else
1095+
else
10961096
{
10971097
Log(LOG_LEVEL_ERR, "Invalid attribute '%s' in function '%s': not supported",
10981098
attribute, fp->name);
10991099
JsonDestroyMaybe(json, allocated);
11001100
JsonDestroy(parent);
1101-
return FnFailure();
1101+
return FnFailure();
11021102
}
11031103
element = JsonIteratorNextValue(&iter);
11041104
}
@@ -1396,7 +1396,7 @@ static FnCallResult FnCallGetGid(ARG_UNUSED EvalContext *ctx, ARG_UNUSED const P
13961396
#endif
13971397
}
13981398

1399-
/*********************************************************************/
1399+
/*********************************************************************/
14001400

14011401
static FnCallResult no_entry(int ret, const FnCall *fp, const char *group_name, bool is_user_db)
14021402
{
@@ -1420,7 +1420,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14201420
assert(finalargs != NULL);
14211421
#ifdef _WIN32
14221422
Log(LOG_LEVEL_ERR, "Function '%s' is POSIX specific", fp->name);
1423-
return FnFailure();
1423+
return FnFailure();
14241424
#else
14251425

14261426
const char *user_name = RlistScalarValue(finalargs);
@@ -1434,7 +1434,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14341434
struct group *grent;
14351435
char gr_buf[GETGR_R_SIZE_MAX] = {0};
14361436
ret = getgrnam_r(group_name, &grp, gr_buf, GETGR_R_SIZE_MAX, &grent);
1437-
1437+
14381438
if (grent == NULL)
14391439
{
14401440
// Group does not exist at all, so cannot be
@@ -1461,7 +1461,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14611461
return no_entry(ret, fp, user_name, true);
14621462
}
14631463
return FnReturnContext(grent->gr_gid == pwent->pw_gid);
1464-
1464+
14651465
#endif
14661466
}
14671467

@@ -3345,7 +3345,7 @@ static FnCallResult FnCallIsConnectable(ARG_UNUSED EvalContext *ctx,
33453345
}
33463346

33473347
return FnReturnContext(sd > -1);
3348-
}
3348+
}
33493349

33503350
/*********************************************************************/
33513351

@@ -7626,7 +7626,7 @@ static FnCallResult ValidateDataGeneric(const char *const fname,
76267626
{
76277627
isvalid = isvalid && JsonGetElementType(json) != JSON_ELEMENT_TYPE_PRIMITIVE;
76287628
}
7629-
7629+
76307630
FnCallResult ret = FnReturnContext(isvalid);
76317631
JsonDestroy(json);
76327632
return ret;
@@ -10807,7 +10807,7 @@ static const FnCallArg IS_DATATYPE_ARGS[] =
1080710807
{NULL, CF_DATA_TYPE_NONE, NULL}
1080810808
};
1080910809
static const FnCallArg FIND_LOCAL_USERS_ARGS[] =
10810-
{
10810+
{
1081110811
{CF_ANYSTRING, CF_DATA_TYPE_STRING, "Filter list"},
1081210812
{NULL, CF_DATA_TYPE_NONE, NULL}
1081310813
};

0 commit comments

Comments
 (0)