From: oetiker Date: Mon, 1 Apr 2002 18:31:22 +0000 (+0000) Subject: "!" takes a higher preference than "||" this means rrd_update N:: would X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a6f454695dcd606a8b95bab0f654272832b0d968;p=rrdtool.git "!" takes a higher preference than "||" this means rrd_update N:: would segfault -- Oliver Cook git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@108 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_diff.c b/src/rrd_diff.c index 0e04de6..3f80a15 100644 --- a/src/rrd_diff.c +++ b/src/rrd_diff.c @@ -7,6 +7,10 @@ ***************************************************************************** * $Id$ * $Log$ + * Revision 1.3 2002/04/01 18:31:22 oetiker + * "!" takes a higher preference than "||" this means rrd_update N:: would + * segfault -- Oliver Cook + * * Revision 1.2 2002/02/01 20:34:49 oetiker * fixed version number and date/time * @@ -35,13 +39,13 @@ rrd_diff(char *a, char *b) char res[LAST_DS_LEN+1], *a1, *b1, *r1, *fix; int c,x,m; - while (!isdigit((int)*a) || *a==0) + while (!(isdigit((int)*a) || *a==0)) a++; fix=a; while (isdigit((int)*fix)) fix++; *fix = 0; /* maybe there is some non digit data in the string */ - while (!isdigit((int)*b) || *b==0) + while (!(isdigit((int)*b) || *b==0)) b++; fix=b; while (isdigit((int)*fix))