From 6eac17b38feef6c4ad683250d229a3d61705bfbb Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 10 Aug 2022 08:49:06 -0700 Subject: [PATCH] xdot parsePolyline: standardize on returning 'NULL' instead of '0' --- lib/xdot/xdot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.40.0