From: Matthew Fernandez Date: Wed, 10 Aug 2022 15:49:06 +0000 (-0700) Subject: xdot parsePolyline: standardize on returning 'NULL' instead of '0' X-Git-Tag: 5.0.1~14^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6eac17b38feef6c4ad683250d229a3d61705bfbb;p=graphviz xdot parsePolyline: standardize on returning 'NULL' instead of '0' --- diff --git a/lib/xdot/xdot.c b/lib/xdot/xdot.c index 7eb7228a3..fb8b019ac 100644 --- a/lib/xdot/xdot.c +++ b/lib/xdot/xdot.c @@ -92,7 +92,7 @@ static char *parsePolyline(char *s, xdot_polyline * pp) char* endp; s = parseInt(s, &i); - if (!s) return s; + if (!s) return NULL; if (i < 0) return NULL; pts = ps = gv_calloc((size_t)i, sizeof(ps[0])); pp->cnt = i; @@ -100,14 +100,14 @@ static char *parsePolyline(char *s, xdot_polyline * pp) ps->x = strtod (s, &endp); if (s == endp) { free (pts); - return 0; + return NULL; } else s = endp; ps->y = strtod (s, &endp); if (s == endp) { free (pts); - return 0; + return NULL; } else s = endp;