24 I have been blameless before him and have kept myself from sin.

Read 2 Samuel 22:24 Using Other Translations

I was also upright before him, and have kept myself from mine iniquity.
I was blameless before him, and I kept myself from guilt.
I am blameless before God; I have kept myself from sin.