Our standards are continually being raised, so by definition any old code is ugly because new best practices have emerged in the meantime. That means when you work on old code there's a tendency to say, “Well, it's already ugly, so it's okay if I'm ugly when I work in this code…”
Obey the camping rule: the camp (“code”) should be cleaner than when you arrived. You don't have to clean all of it, but clean up a bit.
And don't commit the cleanup with your new functional change. Please commit the cleanup first so a) it's obvious you're being a good camper, and b) your functional change stands apart and has an easy-to-read diff.
Don't have SVN commit access? Obey the camping rule when submitting patches.