Commit 2b00538a authored by Brickner_cp's avatar Brickner_cp

2 warnings left.

parent c997f2f5
......@@ -21,16 +21,16 @@ namespace PcapDotNet.Packets.IpV6
/// <summary>
/// Calculates FCS16.
/// </summary>
public static ushort CalculateFrameCheckSequence16(ushort fcs, IEnumerable<byte> values)
public static ushort CalculateFrameCheckSequence16(ushort frameCheckSequence, IEnumerable<byte> values)
{
if (values == null)
throw new ArgumentNullException("values");
foreach (byte value in values)
{
ushort tableValue = _fcsTable[(fcs ^ value) & 0xff];
fcs = (ushort)((fcs >> 8) ^ tableValue);
ushort tableValue = _fcsTable[(frameCheckSequence ^ value) & 0xff];
frameCheckSequence = (ushort)((frameCheckSequence >> 8) ^ tableValue);
}
return fcs;
return frameCheckSequence;
}
private static readonly ushort[] _fcsTable =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment