Skip to content

mix-to-mono: '-' is not a clash of names#95

Open
janstary wants to merge 1 commit intolibsndfile:masterfrom
janstary:argnames
Open

mix-to-mono: '-' is not a clash of names#95
janstary wants to merge 1 commit intolibsndfile:masterfrom
janstary:argnames

Conversation

@janstary
Copy link
Copy Markdown

This fixes #94

Comment thread src/mix-to-mono.c
oname = argv[2];
}

if (strcmp(iname, "-") == 0 || strcmp(oname, "-") == 0) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second strcmp() is not required, because the error is only raised if the names are the same. So if the input isn't a dash and the names are the same, then we know the output also isn't a dash. Or to put it another way, we only need to check for name collisions when the input isn't a dash, and if that is the case, an output dash won't collide with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mix-to-mono vs stdin and stdout

2 participants