File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -231,16 +231,16 @@ fn test_symlink() {
231231 let expected_path = path. as_os_str ( ) . as_bytes ( ) ;
232232
233233 // Test that the expected string gets written to a buffer of proper
234- // length, and that a trailing null byte is not written
234+ // length, and that a trailing null byte is not written.
235235 let symlink_c_str = CString :: new ( symlink_path. as_os_str ( ) . as_bytes ( ) ) . unwrap ( ) ;
236236 let symlink_c_ptr = symlink_c_str. as_ptr ( ) ;
237237
238238 // Make the buf one byte larger than it needs to be,
239- // and check that the last byte is not overwritten
239+ // and check that the last byte is not overwritten.
240240 let mut large_buf = vec ! [ 0xFF ; expected_path. len( ) + 1 ] ;
241241 let res = unsafe { libc:: readlink ( symlink_c_ptr, large_buf. as_mut_ptr ( ) . cast ( ) , large_buf. len ( ) ) } ;
242242 assert_eq ! ( res, large_buf. len( ) as isize - 1 ) ;
243- // Check that the resovled path was properly written into the buf
243+ // Check that the resovled path was properly written into the buf.
244244 assert_eq ! ( & large_buf[ ..( large_buf. len( ) - 1 ) ] , expected_path) ;
245245 assert_eq ! ( large_buf. last( ) , Some ( & 0xFF ) ) ;
246246
You can’t perform that action at this time.
0 commit comments