Removed assigned but never used total_len variable

The total_len variable was locally assigned but not used on it's scope