[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] C99 in src/contrib/ports/win32/sys_arch.c

From: Gisle Vanem
Subject: [lwip-devel] C99 in src/contrib/ports/win32/sys_arch.c
Date: Tue, 26 Sep 2017 17:58:27 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

The recent change in src/contrib/ports/win32/sys_arch.c:

static void sys_win_rand_init(void)
      err = GetLastError();
      char errbuf[128];

requires a C-99 compiler. Is that required now? IMHO, it'd better  be:

static void sys_win_rand_init(void)
  if(!CryptAcquireContext(&hcrypt, NULL, NULL, PROV_RSA_FULL, 0)) {
    DWORD err = GetLastError();
    LWIP_PLATFORM_DIAG(("CryptAcquireContext failed with error %d, trying to create 
NEWKEYSET", (int)err));
    if(!CryptAcquireContext(&hcrypt, NULL, NULL, PROV_RSA_FULL, 
      char errbuf[128];
      err = GetLastError();
      snprintf(errbuf, sizeof(errbuf), "CryptAcquireContext failed with error 
%d", (int)err);
      LWIP_ASSERT(errbuf, 0);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]