Scenario: I've run a static code analysis tool on my sources which found an issue on lots of my files.
The issue is that the statement
*retval = -1;
needs to be replaced by
if(retval != NULL)
{
*retval = -1;
}
I already managed to have all relevant places in an errorfile and started with the cycle
This workflow does it but I've got 400 places to touch, so it's a bit boring.
Could I instruct Vim (similar like for example bufdo) to correct the statement on all the places that are present in the errorfile?
And no, simply opening all the files and bufdo then is not an option since the construct *retval = -1; occurs several times but only needs to be fixed on the lines contained in the errorfile.