mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-23 15:16:25 +01:00
remove useless test, fgets() already ensures MAX_STRING_LEN
Found by PVS-Studio - https://www.viva64.com/en/b/0540/
This commit is contained in:
parent
2fec64f0bd
commit
1a46ee716d
1 changed files with 6 additions and 6 deletions
|
|
@ -259,14 +259,14 @@ read_string (FILE *fp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen (buf) < MAX_STRING_LEN) {
|
if (strlen (buf)) {
|
||||||
if (strlen (buf)) {
|
/* strip lash char here: '\n',
|
||||||
buf[strlen (buf)-1] = 0;
|
* since VST-params cannot be longer than 127 chars.
|
||||||
}
|
*/
|
||||||
|
buf[strlen (buf)-1] = 0;
|
||||||
return strdup (buf);
|
return strdup (buf);
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Read an integer value from a line in fp into n,
|
/** Read an integer value from a line in fp into n,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue