We don't need a result variable as t->ctype caches the value
Merge pull request #3109 from yebblies/toctype2

[refactor] We don't need a result variable as t->ctype caches the value