]> granicus.if.org Git - graphviz/commitdiff
setattr: take a const pointer for 'value' argument that is not modified
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Aug 2021 19:04:44 +0000 (12:04 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 19 Aug 2021 02:45:10 +0000 (19:45 -0700)
Related to #634.

lib/cgraph/attr.c

index a2b2cbfc92968f388ac12a6978db497d3404458e..65e98c793cb221e5d1defa81e038233fbfcb238e 100644 (file)
@@ -249,8 +249,7 @@ static void addattr(Agraph_t * g, Agobj_t * obj, Agsym_t * sym)
 }
 
 
-static Agsym_t *setattr(Agraph_t * g, int kind, char *name, char *value)
-{
+static Agsym_t *setattr(Agraph_t * g, int kind, char *name, const char *value) {
     Dict_t *ldict, *rdict;
     Agsym_t *lsym, *psym, *rsym, *rv;
     Agraph_t *root;