comparison gtk/dw.c @ 2855:86286f528adf

Fix new safety warnings reported by the new GCC on Linux. The semaphore code is used on other platforms... make sure all platforms using this code are the same.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 15 Nov 2022 03:50:00 +0000
parents 8a5131cbbe93
children 59106bf7f9f4
comparison
equal deleted inserted replaced
2854:8a5131cbbe93 2855:86286f528adf
9915 memcpy(newarray, &array[1], sizeof(struct _dw_seminfo)*(connectcount-1)); 9915 memcpy(newarray, &array[1], sizeof(struct _dw_seminfo)*(connectcount-1));
9916 else 9916 else
9917 { 9917 {
9918 memcpy(newarray, array, sizeof(struct _dw_seminfo)*z); 9918 memcpy(newarray, array, sizeof(struct _dw_seminfo)*z);
9919 if(z!=(connectcount-1)) 9919 if(z!=(connectcount-1))
9920 memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(z-connectcount-1)); 9920 memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(connectcount-(z+1)));
9921 } 9921 }
9922 connectcount--; 9922 connectcount--;
9923 9923
9924 /* Replace old array with new one */ 9924 /* Replace old array with new one */
9925 free(array); 9925 free(array);