Skip to content

Commit 767ceff

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

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
@@ -976,7 +976,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
976976
assert(fp != NULL);
977977
bool allocated = false;
978978
JsonElement *json = VarNameOrInlineToJson(ctx, fp, finalargs, false, &allocated);
979-
979+
980980
// we failed to produce a valid JsonElement, so give up
981981
if (json == NULL)
982982
{
@@ -991,7 +991,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
991991
JsonDestroyMaybe(json, allocated);
992992
return FnFailure();
993993
}
994-
994+
995995
JsonElement *parent = JsonObjectCreate(10);
996996
setpwent();
997997
struct passwd *pw;
@@ -1036,7 +1036,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10361036
{
10371037
char uid_string[PRINTSIZE(pw->pw_uid)];
10381038
int ret = snprintf(uid_string, sizeof(uid_string), "%u", pw->pw_uid);
1039-
1039+
10401040
if (ret < 0)
10411041
{
10421042
Log(LOG_LEVEL_ERR, "Couldn't convert the uid of '%s' to string in function '%s'",
@@ -1068,7 +1068,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10681068
assert((size_t) ret < sizeof(gid_string));
10691069

10701070
if (!StringMatchFull(value, gid_string))
1071-
{
1071+
{
10721072
can_add_to_json = false;
10731073
}
10741074
}
@@ -1093,13 +1093,13 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10931093
can_add_to_json = false;
10941094
}
10951095
}
1096-
else
1096+
else
10971097
{
10981098
Log(LOG_LEVEL_ERR, "Invalid attribute '%s' in function '%s': not supported",
10991099
attribute, fp->name);
11001100
JsonDestroyMaybe(json, allocated);
11011101
JsonDestroy(parent);
1102-
return FnFailure();
1102+
return FnFailure();
11031103
}
11041104
element = JsonIteratorNextValue(&iter);
11051105
}
@@ -1397,7 +1397,7 @@ static FnCallResult FnCallGetGid(ARG_UNUSED EvalContext *ctx, ARG_UNUSED const P
13971397
#endif
13981398
}
13991399

1400-
/*********************************************************************/
1400+
/*********************************************************************/
14011401

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

14271427
const char *user_name = RlistScalarValue(finalargs);
@@ -1435,7 +1435,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14351435
struct group *grent;
14361436
char gr_buf[GETGR_R_SIZE_MAX] = {0};
14371437
ret = getgrnam_r(group_name, &grp, gr_buf, GETGR_R_SIZE_MAX, &grent);
1438-
1438+
14391439
if (grent == NULL)
14401440
{
14411441
// Group does not exist at all, so cannot be
@@ -1462,7 +1462,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14621462
return no_entry(ret, fp, user_name, true);
14631463
}
14641464
return FnReturnContext(grent->gr_gid == pwent->pw_gid);
1465-
1465+
14661466
#endif
14671467
}
14681468

@@ -3346,7 +3346,7 @@ static FnCallResult FnCallIsConnectable(ARG_UNUSED EvalContext *ctx,
33463346
}
33473347

33483348
return FnReturnContext(sd > -1);
3349-
}
3349+
}
33503350

33513351
/*********************************************************************/
33523352

@@ -7627,7 +7627,7 @@ static FnCallResult ValidateDataGeneric(const char *const fname,
76277627
{
76287628
isvalid = isvalid && JsonGetElementType(json) != JSON_ELEMENT_TYPE_PRIMITIVE;
76297629
}
7630-
7630+
76317631
FnCallResult ret = FnReturnContext(isvalid);
76327632
JsonDestroy(json);
76337633
return ret;
@@ -10808,7 +10808,7 @@ static const FnCallArg IS_DATATYPE_ARGS[] =
1080810808
{NULL, CF_DATA_TYPE_NONE, NULL}
1080910809
};
1081010810
static const FnCallArg FIND_LOCAL_USERS_ARGS[] =
10811-
{
10811+
{
1081210812
{CF_ANYSTRING, CF_DATA_TYPE_STRING, "Filter list"},
1081310813
{NULL, CF_DATA_TYPE_NONE, NULL}
1081410814
};

0 commit comments

Comments
 (0)