unsafe extern "C" fn delete_files(mut path: *mut u8_0, mut prefix: *mut u8_0)
 -> u8_0 {
    let mut d: *mut DIR = 0 as *mut DIR;
    let mut d_ent: *mut dirent = 0 as *mut dirent;
    d = opendir(path as *const libc::c_char);
    if d.is_null() { return 0 as libc::c_int as u8_0 }
    loop  {
        d_ent = readdir(d);
        if d_ent.is_null() { break ; }
        if (*d_ent).d_name[0 as libc::c_int as usize] as libc::c_int !=
               '.' as i32 &&
               (prefix.is_null() ||
                    strncmp((*d_ent).d_name.as_mut_ptr(),
                            prefix as *const libc::c_char,
                            strlen(prefix as *const libc::c_char)) == 0) {
            let mut fname: *mut u8_0 =
                ({
                     let mut _tmp: *mut u8_0 = 0 as *mut u8_0;
                     let mut _len: s32 =
                         snprintf(0 as *mut libc::c_char,
                                  0 as libc::c_int as libc::c_ulong,
                                  b"%s/%s\x00" as *const u8 as
                                      *const libc::c_char, path,
                                  (*d_ent).d_name.as_mut_ptr());
                     if _len < 0 as libc::c_int {
                         printf(b"\x0f\x1b)B\x1b[?25h\x1b[0m\x1b[1;91m\n[-] PROGRAM ABORT : \x1b[0mWhoa, snprintf() fails?!\x00"
                                    as *const u8 as *const libc::c_char);
                         printf(b"\x1b[1;91m\n         Location : \x1b[0m%s(), %s:%u\n\n\x00"
                                    as *const u8 as *const libc::c_char,
                                b"func_unknown\x00" as *const u8 as
                                    *const libc::c_char,
                                b"src/afl-fuzz-init.c\x00" as *const u8 as
                                    *const libc::c_char, 908 as libc::c_int);
                         exit(1 as libc::c_int);
                     }
                     _tmp =
                         DFL_ck_alloc((_len + 1 as libc::c_int) as u32_0) as
                             *mut u8_0;
                     snprintf(_tmp as *mut libc::c_char,
                              (_len + 1 as libc::c_int) as libc::c_ulong,
                              b"%s/%s\x00" as *const u8 as
                                  *const libc::c_char, path,
                              (*d_ent).d_name.as_mut_ptr());
                     _tmp
                 });
            if unlink(fname as *const libc::c_char) != 0 {
                fflush(stdout);
                printf(b"\x0f\x1b)B\x1b[?25h\x1b[0m\x1b[1;91m\n[-]  SYSTEM ERROR : \x1b[0mUnable to delete \'%s\'\x00"
                           as *const u8 as *const libc::c_char, fname);
                printf(b"\x1b[1;91m\n    Stop location : \x1b[0m%s(), %s:%u\n\x00"
                           as *const u8 as *const libc::c_char,
                       b"func_unknown\x00" as *const u8 as
                           *const libc::c_char,
                       b"src/afl-fuzz-init.c\x00" as *const u8 as
                           *const libc::c_char, 909 as libc::c_int);
                printf(b"\x1b[1;91m       OS message : \x1b[0m%s\n\x00" as
                           *const u8 as *const libc::c_char,
                       strerror(*__errno_location()));
                exit(1 as libc::c_int);
            }
            DFL_ck_free(fname as *mut libc::c_void);
        }
    }
    closedir(d);
    return (rmdir(path as *const libc::c_char) != 0) as libc::c_int as u8_0;
}
/* A helper function for handle_existing_out_dir(), deleting all prefixed
   files in a directory. */
A helper function for handle_existing_out_dir(), deleting all prefixed
files in a directory.
A helper function for handle_existing_out_dir () deleting all prefixed files in a directory .
unsafe extern "C" fn delete_files(mut path: *mut u8_0, mut prefix: *mut u8_0)
 -> u8_0 {
    let mut d: *mut DIR = 0 as *mut DIR;
    let mut d_ent: *mut dirent = 0 as *mut dirent;
    d = opendir(path as *const libc::c_char);
    if d.is_null() { return 0 as libc::c_int as u8_0 }
    loop  {
        d_ent = readdir(d);
        if d_ent.is_null() { break ; }
        if (*d_ent).d_name[0 as libc::c_int as usize] as libc::c_int !=
               '.' as i32 &&
               (prefix.is_null() ||
                    strncmp((*d_ent).d_name.as_mut_ptr(),
                            prefix as *const libc::c_char,
                            strlen(prefix as *const libc::c_char)) == 0) {
            let mut fname: *mut u8_0 =
                ({
                     let mut _tmp: *mut u8_0 = 0 as *mut u8_0;
                     let mut _len: s32 =
                         snprintf(0 as *mut libc::c_char,
                                  0 as libc::c_int as libc::c_ulong,
                                  b"%s/%s\x00" as *const u8 as
                                      *const libc::c_char, path,
                                  (*d_ent).d_name.as_mut_ptr());
                     if _len < 0 as libc::c_int {
                         printf(b"\x0f\x1b)B\x1b[?25h\x1b[0m\x1b[1;91m\n[-] PROGRAM ABORT : \x1b[0mWhoa, snprintf() fails?!\x00"
                                    as *const u8 as *const libc::c_char);
                         printf(b"\x1b[1;91m\n         Location : \x1b[0m%s(), %s:%u\n\n\x00"
                                    as *const u8 as *const libc::c_char,
                                b"func_unknown\x00" as *const u8 as
                                    *const libc::c_char,
                                b"src/afl-fuzz-init.c\x00" as *const u8 as
                                    *const libc::c_char, 908 as libc::c_int);
                         exit(1 as libc::c_int);
                     }
                     _tmp =
                         DFL_ck_alloc((_len + 1 as libc::c_int) as u32_0) as
                             *mut u8_0;
                     snprintf(_tmp as *mut libc::c_char,
                              (_len + 1 as libc::c_int) as libc::c_ulong,
                              b"%s/%s\x00" as *const u8 as
                                  *const libc::c_char, path,
                              (*d_ent).d_name.as_mut_ptr());
                     _tmp
                 });
            if unlink(fname as *const libc::c_char) != 0 {
                fflush(stdout);
                printf(b"\x0f\x1b)B\x1b[?25h\x1b[0m\x1b[1;91m\n[-]  SYSTEM ERROR : \x1b[0mUnable to delete \'%s\'\x00"
                           as *const u8 as *const libc::c_char, fname);
                printf(b"\x1b[1;91m\n    Stop location : \x1b[0m%s(), %s:%u\n\x00"
                           as *const u8 as *const libc::c_char,
                       b"func_unknown\x00" as *const u8 as
                           *const libc::c_char,
                       b"src/afl-fuzz-init.c\x00" as *const u8 as
                           *const libc::c_char, 909 as libc::c_int);
                printf(b"\x1b[1;91m       OS message : \x1b[0m%s\n\x00" as
                           *const u8 as *const libc::c_char,
                       strerror(*__errno_location()));
                exit(1 as libc::c_int);
            }
            DFL_ck_free(fname as *mut libc::c_void);
        }
    }
    closedir(d);
    return (rmdir(path as *const libc::c_char) != 0) as libc::c_int as u8_0;
}
unsafe extern " " fn delete_files ( mut path : * mut u8_0 , mut prefix : * mut u8_0 ) -> u8_0 { let mut d : * mut DIR = 0 as * mut DIR ; let mut d_ent : * mut dirent = 0 as * mut dirent ; d = opendir ( path as * const libc :: c_char ) ; if d . is_null ( ) { return 0 as libc :: c_int as u8_0 } loop { d_ent = readdir ( d ) ; if d_ent . is_null ( ) { break ; } if ( * d_ent ) . d_name [ 0 as libc :: c_int as usize ] as libc :: c_int != '.' as i32 && ( prefix . is_null ( ) || strncmp ( ( * d_ent ) . d_name . as_mut_ptr ( ) , prefix as * const libc :: c_char , strlen ( prefix as * const libc :: c_char ) ) == 0 ) { let mut fname : * mut u8_0 = ( { let mut _tmp : * mut u8_0 = 0 as * mut u8_0 ; let mut _len : s32 = snprintf ( 0 as * mut libc :: c_char , 0 as libc :: c_int as libc :: c_ulong , b" \x00 " as * const u8 as * const libc :: c_char , path , ( * d_ent ) . d_name . as_mut_ptr ( ) ) ; if _len < 0 as libc :: c_int { printf ( b" \x0f \x1b \x1b \x1b \x1b \n \x1b \x00 " as * const u8 as * const libc :: c_char ) ; printf ( b" \x1b \n \x1b \n \n \x00 " as * const u8 as * const libc :: c_char , b" \x00 " as * const u8 as * const libc :: c_char , b" \x00 " as * const u8 as * const libc :: c_char , 908 as libc :: c_int ) ; exit ( 1 as libc :: c_int ) ; } _tmp = DFL_ck_alloc ( ( _len + 1 as libc :: c_int ) as u32_0 ) as * mut u8_0 ; snprintf ( _tmp as * mut libc :: c_char , ( _len + 1 as libc :: c_int ) as libc :: c_ulong , b" \x00 " as * const u8 as * const libc :: c_char , path , ( * d_ent ) . d_name . as_mut_ptr ( ) ) ; _tmp } ) ; if unlink ( fname as * const libc :: c_char ) != 0 { fflush ( stdout ) ; printf ( b" \x0f \x1b \x1b \x1b \x1b \n \x1b \' \' \x00 " as * const u8 as * const libc :: c_char , fname ) ; printf ( b" \x1b \n \x1b \n \x00 " as * const u8 as * const libc :: c_char , b" \x00 " as * const u8 as * const libc :: c_char , b" \x00 " as * const u8 as * const libc :: c_char , 909 as libc :: c_int ) ; printf ( b" \x1b \x1b \n \x00 " as * const u8 as * const libc :: c_char , strerror ( * __errno_location ( ) ) ) ; exit ( 1 as libc :: c_int ) ; } DFL_ck_free ( fname as * mut libc :: c_void ) ; } } closedir ( d ) ; return ( rmdir ( path as * const libc :: c_char ) != 0 ) as libc :: c_int as u8_0 ; }
A helper function for handle_existing_out_dir(), deleting all prefixed
files in a directory.
A helper function for handle_existing_out_dir () deleting all prefixed files in a directory .
path
*mut u8_0
prefix
*mut u8_0
path
*mut u8_0
prefix
*mut u8_0