File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ impl WritePipes {
286286 Entry :: Vacant ( e) => {
287287 let command: CString = command. try_into ( ) ?;
288288 let file = unsafe {
289- let file = libc:: popen ( command. as_ptr ( ) , "w \0 ". as_ptr ( ) as * const i8 ) ;
289+ let file = libc:: popen ( command. as_ptr ( ) , c"w ". as_ptr ( ) ) ;
290290 if file. is_null ( ) {
291291 return Err ( "failed to open pipe" . to_string ( ) ) ;
292292 }
@@ -351,7 +351,7 @@ impl PipeRecordReader {
351351 pub fn open ( command : & str ) -> Result < Self , String > {
352352 let command = CString :: new ( command) . map_err ( |e| e. to_string ( ) ) ?;
353353 let file = unsafe {
354- let file = libc:: popen ( command. as_ptr ( ) , "r \0 ". as_ptr ( ) as * const i8 ) ;
354+ let file = libc:: popen ( command. as_ptr ( ) , c"r ". as_ptr ( ) ) ;
355355 if file. is_null ( ) {
356356 return Err ( "failed to open pipe" . to_string ( ) ) ;
357357 }
You can’t perform that action at this time.
0 commit comments