Hi Chao,
Thank you for working on this.
The patch looks good to me and makes the code more easy to read.
Regards,Surya Poondla