Skip to content

Hw3 - #9

Open
EStarikov wants to merge 9 commits into
mainfrom
hw3
Open

Hw3#9
EStarikov wants to merge 9 commits into
mainfrom
hw3

Conversation

@EStarikov

@EStarikov EStarikov commented Mar 28, 2026 •

Copy link
Copy Markdown
Owner

Пустые CMakeLists.txt нужны чтобы проходил clang-tidy, при мердже они будут удалены

@EStarikov EStarikov changed the title first realisation Hw3 Mar 28, 2026
Comment thread src/hw3/states.c
Comment on lines +17 to +18
Heap* heap = calloc(1, sizeof(Heap));
return heap;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Heap* heap = calloc(1, sizeof(Heap));
return heap;
return calloc(1, sizeof(Heap));

Comment thread src/hw3/states.c
fscanf(input, "%u", &m);
int i, j;
size_t len;
int err = 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

err можно было и объявлять в месте первого использования, в строке 145. Вне цикла она не нужна

Comment thread src/hw3/tests.c
#include <stdlib.h>
#include <string.h>

char* create_test_file(const char* content)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Внезапно snake_case, хотя везде выше camelCase

Comment thread src/hw3/tests.c
char* create_test_file(const char* content)
{
char* filename = strdup("/tmp/test_states_XXXXXX");
int fd = mkstemp(filename);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Имя не очень

Comment thread src/hw3/tests.c

char* create_test_file(const char* content)
{
char* filename = strdup("/tmp/test_states_XXXXXX");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
char* filename = strdup("/tmp/test_states_XXXXXX");
char* fileName = strdup("/tmp/test_states_XXXXXX");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants