Project

General

Profile

Actions

Bug #12203

closed

dumper.c static int yaml_emitter_dump_scalar two variables have the same value

Added by fanantoxa (Anton Sivakov) about 8 years ago. Updated almost 7 years ago.

Status:
Third Party's Issue
Target version:
-
[ruby-core:74474]

Description

static int
yaml_emitter_dump_scalar(
.....
int plain_implicit = (strcmp((char *)node->tag,
               YAML_DEFAULT_SCALAR_TAG) == 0);
int quoted_implicit = (strcmp((char *)node->tag,
                YAML_DEFAULT_SCALAR_TAG) == 0);

variables 'plain_implicit' and 'quoted_implicit' have the same values. It possible wrong expression or this code can be optimized.

Updated by shyouhei (Shyouhei Urabe) about 8 years ago

  • Status changed from Open to Assigned
  • Assignee set to tenderlovemaking (Aaron Patterson)

They are passed to a macro. I guess the author intentionally separated these two because merging them makes the code less intuitive. It seems OK to be optimized.

Updated by fanantoxa (Anton Sivakov) almost 7 years ago

shyouhei (Shyouhei Urabe) wrote:

They are passed to a macro. I guess the author intentionally separated these two because merging them makes the code less intuitive. It seems OK to be optimized.

Maybe reassign to someone else? Or at lease chen that this still here?

Updated by nobu (Nobuyoshi Nakada) almost 7 years ago

  • Status changed from Assigned to Third Party's Issue

Please report it to the upstream, https://github.com/ruby/psych.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0