Skip to content

Commit 4c46be6

Browse files
committed
Cleanup.
1 parent e06d451 commit 4c46be6

File tree

1 file changed

+5
-4
lines changed
  • src/FirebirdSql.Data.FirebirdClient/Client/Managed/Sspi

1 file changed

+5
-4
lines changed

src/FirebirdSql.Data.FirebirdClient/Client/Managed/Sspi/SspiHelper.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@ internal sealed class SspiHelper : IDisposable
2626
{
2727
public string Name { get; } = "Win_Sspi";
2828

29+
private const int SECBUFFER_VERSION = 0;
30+
2931
private enum SecBufferType
3032
{
31-
SECBUFFER_VERSION = 0,
3233
SECBUFFER_EMPTY = 0,
3334
SECBUFFER_DATA = 1,
34-
SECBUFFER_TOKEN = 2
35+
SECBUFFER_TOKEN = 2,
3536
}
3637

3738
#region Structures used in native Win API calls
@@ -123,7 +124,7 @@ private struct SecBufferDesc : IDisposable
123124

124125
public SecBufferDesc(int bufferSize)
125126
{
126-
ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
127+
ulVersion = SECBUFFER_VERSION;
127128
cBuffers = 1;
128129
var secBuffer = new SecBuffer(bufferSize);
129130
pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(secBuffer));
@@ -132,7 +133,7 @@ public SecBufferDesc(int bufferSize)
132133

133134
public SecBufferDesc(byte[] secBufferBytes)
134135
{
135-
ulVersion = (int)SecBufferType.SECBUFFER_VERSION;
136+
ulVersion = SECBUFFER_VERSION;
136137
cBuffers = 1;
137138
var secBuffer = new SecBuffer(secBufferBytes);
138139
pBuffers = Marshal.AllocHGlobal(Marshal.SizeOf(secBuffer));

0 commit comments

Comments
 (0)