Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second commit for crc32 #303

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Second commit for crc32 #303

wants to merge 3 commits into from

Conversation

RodneyDong
Copy link

No description provided.

Copy link
Collaborator

@Bafran Bafran left a comment

Choose a reason for hiding this comment

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

Generally looks good thanks! One of your commits says passing smoke. Please make a smoke test to act as a code example as well as a basic test

@@ -0,0 +1,29 @@
#include "crc32.h" // Include the header file for CRC32 function declarations

#include "log.h" // Include the logging utility, possibly used for debugging or status messages
Copy link
Collaborator

Choose a reason for hiding this comment

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

Closing out for now, please let us know if it should get merged

return STATUS_CODE_OK; // Return OK status
}

// Function to calculate CRC32 for a given buffer, with an option to append to an existing CRC
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there an option to append an existing CRC? If so, please explain in this comment what parameter does that and how a user might do this

CRC_CalcCRC(buffer[i]); // Calculate CRC for each byte
}

return ~CRC_GetCRC(); // Return the inverted final CRC value
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you change this comment to explain why it's being inverted

@@ -0,0 +1,41 @@
#include "crc32.h" // Include the header file for CRC32 function declarations

#include "log.h" // Include the logging utility, possibly used for debugging or status messages
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same thing with comments here, can be removed

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