Move smb_bug in pv_crs_fini inside the #if HAVE_IPC block so the code can compile on non IPC systems, as per patch from Benoit Pierre.
This commit is contained in:
+4
-4
@@ -636,12 +636,9 @@ void pv_crs_fini(pvstate_t state)
|
||||
{
|
||||
char cup_cmd[32]; /* flawfinder: ignore */
|
||||
unsigned int y;
|
||||
struct shmid_ds shm_buf;
|
||||
|
||||
/* flawfinder - "cup_cmd" is zeroed, and only written by pv_snprintf() */
|
||||
|
||||
memset(&shm_buf, 0, sizeof(shm_buf));
|
||||
|
||||
debug("%s", "fini");
|
||||
|
||||
y = (unsigned int) (state->crs_y_start);
|
||||
@@ -692,8 +689,11 @@ void pv_crs_fini(pvstate_t state)
|
||||
* If we are the last instance detaching from the shared memory,
|
||||
* delete it so it's not left lying around.
|
||||
*/
|
||||
if (state->crs_pvcount < 2)
|
||||
if (state->crs_pvcount < 2) {
|
||||
struct shmid_ds shm_buf;
|
||||
memset(&shm_buf, 0, sizeof(shm_buf));
|
||||
(void) shmctl(state->crs_shmid, IPC_RMID, &shm_buf);
|
||||
}
|
||||
|
||||
#endif /* HAVE_IPC */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user