History

prevent duplicate error message

robs committed 17 years ago

Commit faca3a31 parent 2dfdbc61 file · +8 −4Browse files

Unified · Split

src/formats.c+8−4
@@ -708,23 +708,27 @@ sox_format_handler_t const * sox_write_handler( · 707 unmodified lines
708 sox_format_handler_t const * handler;708 sox_format_handler_t const * handler;
709 if (filetype) {709 if (filetype) {
710 if (!(handler = sox_find_format(filetype, sox_false))) {710 if (!(handler = sox_find_format(filetype, sox_false))) {
711 lsx_fail("no handler for given file type `%s'", filetype);711 if (filetype1)
712 lsx_fail("no handler for given file type `%s'", filetype);
712 return NULL;713 return NULL;
713 }714 }
714 }715 }
715 else if (path) {716 else if (path) {
716 if (!(filetype = lsx_find_file_extension(path))) {717 if (!(filetype = lsx_find_file_extension(path))) {
717 lsx_fail("can't determine type of `%s'", path);718 if (filetype1)
719 lsx_fail("can't determine type of `%s'", path);
718 return NULL;720 return NULL;
719 }721 }
720 if (!(handler = sox_find_format(filetype, sox_true))) {722 if (!(handler = sox_find_format(filetype, sox_true))) {
721 lsx_fail("no handler for file extension `%s'", filetype);723 if (filetype1)
724 lsx_fail("no handler for file extension `%s'", filetype);
722 return NULL;725 return NULL;
723 }726 }
724 }727 }
725 else return NULL;728 else return NULL;
726 if (!handler->startwrite && !handler->write) {729 if (!handler->startwrite && !handler->write) {
727 lsx_fail("file type `%s' isn't writeable", filetype);730 if (filetype1)
731 lsx_fail("file type `%s' isn't writeable", filetype);
728 return NULL;732 return NULL;
729 }733 }
730 if (filetype1)734 if (filetype1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t