Skip to content

Commit eb33b89

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

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
@@ -981,7 +981,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
981981
assert(fp != NULL);
982982
bool allocated = false;
983983
JsonElement *json = VarNameOrInlineToJson(ctx, fp, finalargs, false, &allocated);
984-
984+
985985
// we failed to produce a valid JsonElement, so give up
986986
if (json == NULL)
987987
{
@@ -996,7 +996,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
996996
JsonDestroyMaybe(json, allocated);
997997
return FnFailure();
998998
}
999-
999+
10001000
JsonElement *parent = JsonObjectCreate(10);
10011001
setpwent();
10021002
struct passwd *pw;
@@ -1041,7 +1041,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10411041
{
10421042
char uid_string[PRINTSIZE(pw->pw_uid)];
10431043
int ret = snprintf(uid_string, sizeof(uid_string), "%u", pw->pw_uid);
1044-
1044+
10451045
if (ret < 0)
10461046
{
10471047
Log(LOG_LEVEL_ERR, "Couldn't convert the uid of '%s' to string in function '%s'",
@@ -1073,7 +1073,7 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10731073
assert((size_t) ret < sizeof(gid_string));
10741074

10751075
if (!StringMatchFull(value, gid_string))
1076-
{
1076+
{
10771077
can_add_to_json = false;
10781078
}
10791079
}
@@ -1098,13 +1098,13 @@ static FnCallResult FnCallFindLocalUsers(EvalContext *ctx, ARG_UNUSED const Poli
10981098
can_add_to_json = false;
10991099
}
11001100
}
1101-
else
1101+
else
11021102
{
11031103
Log(LOG_LEVEL_ERR, "Invalid attribute '%s' in function '%s': not supported",
11041104
attribute, fp->name);
11051105
JsonDestroyMaybe(json, allocated);
11061106
JsonDestroy(parent);
1107-
return FnFailure();
1107+
return FnFailure();
11081108
}
11091109
element = JsonIteratorNextValue(&iter);
11101110
}
@@ -1402,7 +1402,7 @@ static FnCallResult FnCallGetGid(ARG_UNUSED EvalContext *ctx, ARG_UNUSED const P
14021402
#endif
14031403
}
14041404

1405-
/*********************************************************************/
1405+
/*********************************************************************/
14061406

14071407
static FnCallResult no_entry(int ret, const FnCall *fp, const char *group_name, bool is_user_db)
14081408
{
@@ -1426,7 +1426,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14261426
assert(finalargs != NULL);
14271427
#ifdef _WIN32
14281428
Log(LOG_LEVEL_ERR, "Function '%s' is POSIX specific", fp->name);
1429-
return FnFailure();
1429+
return FnFailure();
14301430
#else
14311431

14321432
const char *user_name = RlistScalarValue(finalargs);
@@ -1440,7 +1440,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14401440
struct group *grent;
14411441
char gr_buf[GETGR_R_SIZE_MAX] = {0};
14421442
ret = getgrnam_r(group_name, &grp, gr_buf, GETGR_R_SIZE_MAX, &grent);
1443-
1443+
14441444
if (grent == NULL)
14451445
{
14461446
// Group does not exist at all, so cannot be
@@ -1467,7 +1467,7 @@ static FnCallResult FnCallUserInGroup(ARG_UNUSED EvalContext *ctx, ARG_UNUSED co
14671467
return no_entry(ret, fp, user_name, true);
14681468
}
14691469
return FnReturnContext(grent->gr_gid == pwent->pw_gid);
1470-
1470+
14711471
#endif
14721472
}
14731473

@@ -3351,7 +3351,7 @@ static FnCallResult FnCallIsConnectable(ARG_UNUSED EvalContext *ctx,
33513351
}
33523352

33533353
return FnReturnContext(sd > -1);
3354-
}
3354+
}
33553355

33563356
/*********************************************************************/
33573357

@@ -7632,7 +7632,7 @@ static FnCallResult ValidateDataGeneric(const char *const fname,
76327632
{
76337633
isvalid = isvalid && JsonGetElementType(json) != JSON_ELEMENT_TYPE_PRIMITIVE;
76347634
}
7635-
7635+
76367636
FnCallResult ret = FnReturnContext(isvalid);
76377637
JsonDestroy(json);
76387638
return ret;
@@ -10813,7 +10813,7 @@ static const FnCallArg IS_DATATYPE_ARGS[] =
1081310813
{NULL, CF_DATA_TYPE_NONE, NULL}
1081410814
};
1081510815
static const FnCallArg FIND_LOCAL_USERS_ARGS[] =
10816-
{
10816+
{
1081710817
{CF_ANYSTRING, CF_DATA_TYPE_STRING, "Filter list"},
1081810818
{NULL, CF_DATA_TYPE_NONE, NULL}
1081910819
};

0 commit comments

Comments
 (0)