Message ID | pull.1625.v3.git.1703672407895.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v3] sideband.c: remove redundant 'NEEDSWORK' tag | expand |
"Chandra Pratap via GitGitGadget" <gitgitgadget@gmail.com> writes: > - * 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. This does not sound like a sufficient justification, though. We should also explain why "int" is good enough for these callers. Otherwise, using size_t throughout the callchain would become another viable solution.
diff --git a/sideband.c b/sideband.c index 6cbfd391c47..a89201d52ac 100644 --- a/sideband.c +++ b/sideband.c @@ -69,7 +69,8 @@ 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. */ static void maybe_colorize_sideband(struct strbuf *dest, const char *src, int n) {