Avoid temporary variable.

Return the value directly from the function and avoid using unnecessary
temporary variable.