Skip to content

sideband.c: replace int with size_t for clarity #1625

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sideband.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ void list_config_color_sideband_slots(struct string_list *list, const char *pref
* of the line. This should be called for a single line only, which is
* passed as the first N characters of the SRC array.
*
* NEEDSWORK: use "size_t n" instead for clarity.
* It is fine to use "int n" here instead of "size_t n" as all calls to this
* function pass an 'int' parameter. Additionally, the buffer involved in
* storing these 'int' values takes input from a packet via the pkt-line
* interface, which is capable of transferring only 64kB at a time.
*/
static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n)
{
Expand Down