Skip to content

Commit

Permalink
int改size_t
Browse files Browse the repository at this point in the history
  • Loading branch information
Minsecrus committed Nov 24, 2024
1 parent 86fe2bf commit 7b28ac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sysapp/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void read(int argc,char** argv) {
if(vfs_read(file,buf,0,file->size) == -1){
goto read_error;
}
for (int i = 0; i < file->size; i++) {
for (size_t i = 0; i < file->size; i++) {
printk("%c",buf[i]);
}
printk("\n");
Expand Down Expand Up @@ -149,7 +149,7 @@ static void ps(){
extern pcb_t *running_proc_head;
// 找出最长进程名
pcb_t *longest_name = running_proc_head;
int longest_name_len = 0;
size_t longest_name_len = 0;
while(longest_name != NULL){
if(strlen(longest_name->name) > longest_name_len)
longest_name_len = strlen(longest_name->name);
Expand Down

0 comments on commit 7b28ac6

Please sign in to comment.