Browse code

core: proper test when initializing _ksr_shutdown_phase shm pointer

Daniel-Constantin Mierla authored on 11/08/2020 14:33:02
Showing 1 changed files
... ...
@@ -110,11 +110,11 @@ unsigned int set_modinit_delay(unsigned int v)
110 110
 }
111 111
 
112 112
 /* shut down phase for instance - kept in shared memory */
113
-static int *_ksr_shutdown_phase = 0;
113
+static int *_ksr_shutdown_phase = NULL;
114 114
 
115 115
 int ksr_shutdown_phase_init(void)
116 116
 {
117
-	if(_ksr_shutdown_phase) {
117
+	if(_ksr_shutdown_phase == NULL) {
118 118
 		_ksr_shutdown_phase = (int*)shm_malloc(sizeof(int));
119 119
 	}
120 120
 	return 0;