File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ pub fn info() {
7272pub fn info_string ( verbose : bool ) -> String {
7373 let result: String ;
7474 unsafe {
75- let mut tmp: * mut c_char = 0 as * mut c_char ;
75+ let mut tmp: * mut c_char = :: std :: ptr :: null_mut ( ) ;
7676 let err_val = af_info_string ( & mut tmp, verbose) ;
7777 HANDLE_ERROR ( AfError :: from ( err_val) ) ;
7878 result = CStr :: from_ptr ( tmp) . to_string_lossy ( ) . into_owned ( ) ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ pub fn get_size(value: DType) -> usize {
3232
3333/// Allocates space using Arrayfire allocator in host memory
3434pub fn alloc_host < T > ( elements : usize , _type : DType ) -> * const T {
35- let ptr = 0 as * const T ;
35+ let ptr: * const T = :: std :: ptr :: null ( ) ;
3636 let bytes = ( elements * get_size ( _type) ) as DimT ;
3737 unsafe {
3838 let err_val = af_alloc_host ( & mut ( ptr as * const c_void ) , bytes) ;
You can’t perform that action at this time.
0 commit comments