Skip to content

Use pre increment instead of post increment#2

Open
srlm-io wants to merge 1 commit intofmahnke:masterfrom
srlm-io:srlm-io-pre-increment
Open

Use pre increment instead of post increment#2
srlm-io wants to merge 1 commit intofmahnke:masterfrom
srlm-io:srlm-io-pre-increment

Conversation

@srlm-io
Copy link
Copy Markdown

@srlm-io srlm-io commented Oct 20, 2017

Avoid a non-zero return code when incrementing the version from a starting value of 0.

$ A=0; ((A++)); echo "ret: $?, A: $A"
ret: 1, A: 1
$ A=0; ((++A)); echo "ret: $?, A: $A"
ret: 0, A: 1

Avoid a non-zero return code when incrementing the version from a starting value of 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant