Skip to content

Commit dfeeb6a

Browse files
committed
Add rule for rename
1 parent e35f62a commit dfeeb6a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

rules/stdio/src.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,7 @@ int f19(FILE *stream, off_t offset, int whence) {
5656
}
5757

5858
FILE *f20(int fd, const char *mode) { return fdopen(fd, mode); }
59+
60+
int f22(const char *a0, const char *a1) {
61+
return rename(a0, a1);
62+
}

rules/stdio/tgt_unsafe.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ unsafe fn f19(a0: *mut ::libc::FILE, a1: i64, a2: i32) -> i32 {
8484
unsafe fn f20(a0: i32, a1: *const u8) -> *mut ::libc::FILE {
8585
libc::fdopen(a0, a1 as *const i8)
8686
}
87+
88+
unsafe fn f22(a0: *const i8, a1: *const i8) -> i32 {
89+
libc::rename(a0 as *const i8, a1 as *const i8)
90+
}

0 commit comments

Comments
 (0)