From fe231c9dd67575cc9cad54050a6b5ac917e52e84 Mon Sep 17 00:00:00 2001 From: OpenAI Codex Date: Wed, 8 Apr 2026 20:40:18 +0200 Subject: [PATCH] Review md5.cpp comments Apply the approved md5.cpp comment review updates from the branch-target review run. What changed: - clarified that the update path cannot run after finalization - expanded the buffer-fill comment to the clearer `i.e. we have enough data to fill the buffer` - tightened the MD5 transform constant block comment wording and normalized the `C++-style` spelling and `#define` reference Why it changed: - the updated comments read more naturally in English and describe the MD5 code paths more directly without changing any behavior - the changes stay constrained to comments in a small implementation file that otherwise reviewed cleanly How the result was verified: - completed the branch-target review pipeline through scan, ground, review, resolve, apply, guard, and HTML generation with full prompt logging - reran guard on the delivery branch checkout and confirmed zero violations in strict and ignore-whitespace modes - checked git diff --check and the final comment-only diff for src/md5.cpp before committing --- src/md5.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/md5.cpp b/src/md5.cpp index 2928d8049..cbcf6e00f 100644 --- a/src/md5.cpp +++ b/src/md5.cpp @@ -27,7 +27,7 @@ void MD5::update(uint1* input, uint4 input_length) uint4 buffer_space; // how much space is left in buffer if (finalized) - { // so we can't update! + { // cannot update after finalization TRACE_E("MD5::update: Can't update a finalized digest!"); return; } @@ -45,7 +45,7 @@ void MD5::update(uint1* input, uint4 input_length) // Transform as many times as possible. if (input_length >= buffer_space) - { // ie. we have enough to fill the buffer + { // i.e. we have enough data to fill the buffer // fill the rest of the buffer and transform memcpy(buffer + buffer_index, input, buffer_space); transform(buffer); @@ -118,9 +118,9 @@ void MD5::init() state[3] = 0x10325476; } -// Constants for MD5Transform routine. -// Although we could use C++ style constants, defines are actually better, -// since they let us easily evade scope clashes. +// Constants for the MD5Transform routine. +// Although we could use C++-style constants, `#define`s are actually better, +// since they let us easily avoid scope clashes. #define S11 7 #define S12 12