fix return value for transient load
This commit is contained in:
parent
4c26225ddc
commit
4e39f13991
@ -187,6 +187,7 @@ Source::set_been_analysed (bool yn)
|
|||||||
int
|
int
|
||||||
Source::load_transients (const string& path)
|
Source::load_transients (const string& path)
|
||||||
{
|
{
|
||||||
|
int rv = 0;
|
||||||
FILE *tf;
|
FILE *tf;
|
||||||
if (! (tf = g_fopen (path.c_str (), "rb"))) {
|
if (! (tf = g_fopen (path.c_str (), "rb"))) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -196,6 +197,7 @@ Source::load_transients (const string& path)
|
|||||||
while (!feof (tf) && !ferror(tf)) {
|
while (!feof (tf) && !ferror(tf)) {
|
||||||
double val;
|
double val;
|
||||||
if (1 != fscanf (tf, "%lf", &val)) {
|
if (1 != fscanf (tf, "%lf", &val)) {
|
||||||
|
rv = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,6 +206,7 @@ Source::load_transients (const string& path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
::fclose (tf);
|
::fclose (tf);
|
||||||
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
Loading…
Reference in New Issue
Block a user