From: Matthew Fernandez Date: Sun, 4 Jul 2021 04:18:44 +0000 (-0700) Subject: take a const pointer as the first argument to agcanonhtmlstr X-Git-Tag: 2.49.0~58^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e1814a77dcb466cb7678df759fa2071d7afa5ed;p=graphviz take a const pointer as the first argument to agcanonhtmlstr This function does not modify its string argument, so it is more accurate to qualify it as const. Related to #634. --- diff --git a/lib/cgraph/write.c b/lib/cgraph/write.c index a23c5e715..9515ab5ef 100644 --- a/lib/cgraph/write.c +++ b/lib/cgraph/write.c @@ -139,7 +139,7 @@ static char *_agstrcanon(char *arg, char *buf) /* agcanonhtmlstr: * Canonicalize html strings. */ -static char *agcanonhtmlstr(char *arg, char *buf) +static char *agcanonhtmlstr(const char *arg, char *buf) { sprintf(buf, "<%s>", arg); return buf;