Skip to content

Fix string redundancy in halt() and correct grammar/comments across P2#224

Merged
pramod-batni merged 1 commit intocodenet:p2-printfrom
apoorvsamota:p2-errata-fix
Apr 8, 2026
Merged

Fix string redundancy in halt() and correct grammar/comments across P2#224
pramod-batni merged 1 commit intocodenet:p2-printfrom
apoorvsamota:p2-errata-fix

Conversation

@apoorvsamota
Copy link
Copy Markdown

Summary
This PR resolves a C string literal redundancy, fixes grammatical errors in documentation and comments, and cleans up the P2 codebase.

Specific Fixes:

  • String Redundancy (main.c): Removed the explicit \0 from the format string in halt() (cprintf("Bye COL%d!\n\0", 331);). The C compiler automatically null-terminates string literals, making the explicit escape sequence redundant and causing an unnecessary double-null in .rodata.
  • Grammar (p2-print.md): Hyphenated "Self-study" to correct compound phrasing.
  • Grammar (console.c): Fixed capitalization in the cprintf documentation comment (Only understands...).
  • Comment Clarity (uart.c): Clarified the baud rate calculation comment to reflect the 115200/9600 divisor logic used in uartinit().

@pramod-batni pramod-batni merged commit b026ebc into codenet:p2-print Apr 8, 2026
@pramod-batni
Copy link
Copy Markdown
Collaborator

Accepting.

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