diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e1f83b5e013..c2df68d1562 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-05-23 Pascal Obry + + * adaint.c (win32_wait): Add missing parentheses. + 2018-05-23 Hristian Kirtchev * exp_ch3.adb (Check_Large_Modular_Array): Moved to Freeze. diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 9e0919e5dfa..07e55e4eb85 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -2591,10 +2591,10 @@ win32_wait (int *status) #else /* Note that index 0 contains the event handle that is signaled when the process list has changed */ - hl = (HANDLE *) xmalloc (sizeof (HANDLE) * hl_len + 1); + hl = (HANDLE *) xmalloc (sizeof (HANDLE) * (hl_len + 1)); hl[0] = ProcListEvt; memmove (&hl[1], HANDLES_LIST, sizeof (HANDLE) * hl_len); - pidl = (int *) xmalloc (sizeof (int) * hl_len + 1); + pidl = (int *) xmalloc (sizeof (int) * (hl_len + 1)); memmove (&pidl[1], PID_LIST, sizeof (int) * hl_len); hl_len++; #endif