]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_keyexpimp.c
cppcheck: Variable is reassigned a value before the old one has been used.
[openssl-gost/engine.git] / gost_keyexpimp.c
index e8ee1ebedce5e9a129f7d1874a78109a6fc73234..e0961ff5f0bba2cc421f4716dc11af3f8b0b2486 100644 (file)
@@ -1,4 +1,8 @@
+#ifdef _WIN32
+#include <winsock.h>
+#else
 #include <arpa/inet.h>
+#endif
 #include <string.h>
 #include <openssl/evp.h>
 #include <openssl/hmac.h>
@@ -172,7 +176,7 @@ int gost_kdftree2012_256(unsigned char *keyout, size_t keyout_len,
     int iters, i = 0;
     unsigned char zero = 0;
     unsigned char *ptr = keyout;
-    HMAC_CTX *ctx = NULL;
+    HMAC_CTX *ctx;
     unsigned char *len_ptr = NULL;
     uint32_t len_repr = htonl(keyout_len * 8);
     size_t len_repr_len = 4;