Refactor sym_equal() in symbol.c

It is unecessary to assign a temporary variable.