Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH v2] branch: colour upstream branches

From: Jeff King <hidden>
Date: 2016-06-15 22:56:49

On Sun, Apr 14, 2013 at 06:38:27PM -0500, Felipe Contreras wrote:
+		if (want_color(branch_use_color))
+			snprintf(fancy, sizeof(fancy), "%s%s%s",
+					branch_get_color(BRANCH_COLOR_UPSTREAM),
+					ref, branch_get_color(BRANCH_COLOR_RESET));
+		else
+			strncpy(fancy, ref, sizeof(fancy));
  $ man strncpy | grep -C1 Warning
  The strncpy() function is similar, except that at most n bytes of src are
  copied.  Warning: If there is no null byte among the first n bytes of src,
  the string placed in dest will not be null-terminated.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help