Question: Here's a situation I ran into recently, which [other](https://meta.stackexchange.com/questions/88627/how-far-can-i-refactor-someone-elses-code) [meta](https://meta.stackexchange.com/questions/101583/when-is-it-appropriate-to-edit-someone-elses-code) [questions](https://meta.stackexchange.com/questions/124111/incorrect-code-edit-comment-or-provide-a-correct-answer) don't seem to cover. The OP wrote:

```
if( foo == bar )
do_stuff( fizz );
do_stuff( buzz );

```

So, formatting it for readability, the "correct" way:

```
if( foo == bar )
    do_stuff( fizz );
do_stuff( buzz );

```

However, the lack of brackets **was** part of the OP's problem. So, I did this:

```
if( foo == bar )
    do_stuff( fizz );
    do_stuff( buzz );

```

And pointed out the issue in the comments.

Does that make sense, or should I have done it the "correct" way?

Answer: 
Since the indentation of the code is, in and of itself, a part of the problem, I wouldn't edit the indentation at all. I don't know if I feel strongly enough to roll back an edit of someone else who changed the indentation, but I would make a point of keeping my own hands off and address the problem(s) in the answer (or comments, depending on whether or not this issue is sufficient to answer the question).
I would not edit the code at all. Instead, I'd ask the OP to format his code first:

1. If no reply. I leave. (Which is how I usually treat uninteresting ask-and-forget questions.)
2. If he does and he notices - problem solved. Either answer in comment and/or close as too localized.
3. If he does and doesn't notice - either answer or answer in comment.

---

Alternatively, I might just a leave a single comment and leave:

> 
> Hint: Format your code
> 
> 
>