Skip to content

Commit 6dabbab

Browse files
committed
libpromises/attributes: Remove unneeded variable initialization
As per CONTRIBUTING.md [1], do not unnecessarily initialize variables. These variables are initialized and set in called functions. [1] https://github.com/cfengine/core/blob/18ee00a02dc95a34a927f7f57b85e0348a03b179/CONTRIBUTING.md?plain=1#L419-L420
1 parent 426f4fe commit 6dabbab

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

libpromises/attributes.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ FileSelect GetSelectConstraints(const EvalContext *ctx, const Promise *pp)
535535

536536
for (rp = s.perms; rp != NULL; rp = rp->next)
537537
{
538-
plus = 0;
539-
minus = 0;
540538
value = RlistScalarValue(rp);
541539

542540
if (!ParseModeString(value, &plus, &minus))
@@ -549,9 +547,6 @@ FileSelect GetSelectConstraints(const EvalContext *ctx, const Promise *pp)
549547
// get constraint bsdflags
550548
s.bsdflags = PromiseGetConstraintAsList(ctx, "search_bsdflags", pp);
551549

552-
fplus = 0;
553-
fminus = 0;
554-
555550
// cannot fail, ParseFlagString always returns true
556551
if (!ParseFlagString(s.bsdflags, &fplus, &fminus))
557552
{

0 commit comments

Comments
 (0)