@@ -5074,23 +5074,23 @@ XLOGShmemInit(void)
50745074
50755075ControlFile = (ControlFileData * )
50765076ShmemInitStruct ("Control File" ,sizeof (ControlFileData ),& foundCFile );
5077- allocptr = ShmemInitStruct ("XLOG Ctl" ,XLOGShmemSize (),& foundXLog );
5077+ XLogCtl = (XLogCtlData * )
5078+ ShmemInitStruct ("XLOG Ctl" ,XLOGShmemSize (),& foundXLog );
50785079
50795080if (foundCFile || foundXLog )
50805081{
50815082/* both should be present or neither */
50825083Assert (foundCFile && foundXLog );
50835084return ;
50845085}
5085- XLogCtl = (XLogCtlData * )allocptr ;
50865086memset (XLogCtl ,0 ,sizeof (XLogCtlData ));
50875087
50885088/*
50895089 * Since XLogCtlData contains XLogRecPtr fields, its sizeof should be a
50905090 * multiple of the alignment for same, so no extra alignment padding is
50915091 * needed here.
50925092 */
5093- allocptr += sizeof (XLogCtlData );
5093+ allocptr = (( char * ) XLogCtl ) + sizeof (XLogCtlData );
50945094XLogCtl -> xlblocks = (XLogRecPtr * )allocptr ;
50955095memset (XLogCtl -> xlblocks ,0 ,sizeof (XLogRecPtr )* XLOGbuffers );
50965096allocptr += sizeof (XLogRecPtr )* XLOGbuffers ;