Skip to content

Commit

Permalink
Try this then.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHenson committed Oct 27, 2023
1 parent c5cd051 commit 655b708
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions source/linux/system_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ uint16_t aws_get_cpu_group_count() {

uint16_t count = 0;

const struct aws_directory_entry *dir_entry = aws_directory_entry_iterator_get_value(dir_iter);
do {
const struct aws_directory_entry *dir_entry = aws_directory_entry_iterator_get_value(dir_iter);
if (dir_entry) {
struct aws_byte_cursor search_cur = aws_byte_cursor_from_c_str("node");
if ((dir_entry->file_type & (AWS_FILE_TYPE_SYM_LINK | AWS_FILE_TYPE_DIRECTORY)) &&
aws_byte_cursor_starts_with_ignore_case(&dir_entry->path, &search_cur)) {
count++;
}

while (dir_entry) {
struct aws_byte_cursor search_cur = aws_byte_cursor_from_c_str("node");
if ((dir_entry->file_type & (AWS_FILE_TYPE_SYM_LINK | AWS_FILE_TYPE_DIRECTORY)) &&
aws_byte_cursor_starts_with_ignore_case(&dir_entry->path, &search_cur)) {
count++;
}
aws_directory_entry_iterator_next(dir_iter);
dir_entry = aws_directory_entry_iterator_get_value(dir_iter);
}
} while (aws_directory_entry_iterator_next(dir_iter) == AWS_OP_SUCCESS);

aws_directory_entry_iterator_destroy(dir_iter);
return count;
Expand Down

0 comments on commit 655b708

Please sign in to comment.