mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Remove dead code. Calculated greatest common divisor was not used at all.
On top of that, LLVM+Clang mis-compiles this code because of its register allocator bug. Analyzed by: Andrew Reilly (areilly at bigpond dot net dot au) Reviewed by: ariff, rdivacky MFC after: 3 days
This commit is contained in:
parent
d8b878873e
commit
8c975e70af
1 changed files with 0 additions and 11 deletions
|
|
@ -568,7 +568,6 @@ sndbuf_updateprevtotal(struct snd_dbuf *b)
|
|||
unsigned int
|
||||
snd_xbytes(unsigned int v, unsigned int from, unsigned int to)
|
||||
{
|
||||
unsigned int w, x, y;
|
||||
|
||||
if (from == to)
|
||||
return v;
|
||||
|
|
@ -576,16 +575,6 @@ snd_xbytes(unsigned int v, unsigned int from, unsigned int to)
|
|||
if (from == 0 || to == 0 || v == 0)
|
||||
return 0;
|
||||
|
||||
x = from;
|
||||
y = to;
|
||||
while (y != 0) {
|
||||
w = x % y;
|
||||
x = y;
|
||||
y = w;
|
||||
}
|
||||
from /= x;
|
||||
to /= x;
|
||||
|
||||
return (unsigned int)(((u_int64_t)v * to) / from);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue