@@ -97,7 +97,7 @@ impl RegKey {
97
97
options : u32 ,
98
98
) -> io:: Result < RegKey > {
99
99
let c_filename = to_utf16 ( filename) ;
100
- let mut new_hkey: HKEY = 0 ;
100
+ let mut new_hkey: HKEY = std :: ptr :: null_mut ( ) ;
101
101
match unsafe {
102
102
Registry :: RegLoadAppKeyW ( c_filename. as_ptr ( ) , & mut new_hkey, perms, options, 0 )
103
103
} {
@@ -191,7 +191,7 @@ impl RegKey {
191
191
perms : Registry :: REG_SAM_FLAGS ,
192
192
) -> io:: Result < RegKey > {
193
193
let c_path = to_utf16 ( path) ;
194
- let mut new_hkey: HKEY = 0 ;
194
+ let mut new_hkey: HKEY = std :: ptr :: null_mut ( ) ;
195
195
match unsafe {
196
196
Registry :: RegOpenKeyExW ( self . hkey , c_path. as_ptr ( ) , options, perms, & mut new_hkey)
197
197
} {
@@ -231,7 +231,7 @@ impl RegKey {
231
231
perms : Registry :: REG_SAM_FLAGS ,
232
232
) -> io:: Result < RegKey > {
233
233
let c_path = to_utf16 ( path) ;
234
- let mut new_hkey: HKEY = 0 ;
234
+ let mut new_hkey: HKEY = std :: ptr :: null_mut ( ) ;
235
235
match unsafe {
236
236
Registry :: RegOpenKeyTransactedW (
237
237
self . hkey ,
@@ -292,7 +292,7 @@ impl RegKey {
292
292
perms : Registry :: REG_SAM_FLAGS ,
293
293
) -> io:: Result < ( RegKey , RegDisposition ) > {
294
294
let c_path = to_utf16 ( path) ;
295
- let mut new_hkey: HKEY = 0 ;
295
+ let mut new_hkey: HKEY = std :: ptr :: null_mut ( ) ;
296
296
let mut disp_buf: u32 = 0 ;
297
297
match unsafe {
298
298
Registry :: RegCreateKeyExW (
@@ -346,7 +346,7 @@ impl RegKey {
346
346
perms : Registry :: REG_SAM_FLAGS ,
347
347
) -> io:: Result < ( RegKey , RegDisposition ) > {
348
348
let c_path = to_utf16 ( path) ;
349
- let mut new_hkey: HKEY = 0 ;
349
+ let mut new_hkey: HKEY = std :: ptr :: null_mut ( ) ;
350
350
let mut disp_buf: u32 = 0 ;
351
351
match unsafe {
352
352
Registry :: RegCreateKeyTransactedW (
0 commit comments