From: oetiker Date: Sun, 21 May 2006 12:37:12 +0000 (+0000) Subject: allow DS names starting with the same letters as operators X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6364062338cf4ba2f8e9b14e076d5c574c1a56bd;p=rrdtool.git allow DS names starting with the same letters as operators git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@828 a5681a0c-68f1-0310-ab6d-d61299d08faa --- diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index 3c6510f..104ea8f 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -274,9 +274,9 @@ rpn_parse(void *key_hash,const char *const expr_const,long (*lookup)(void *,char } #define match_op(VV,VVV) \ - else if (strncmp(expr, #VVV, strlen(#VVV))==0){ \ - rpnp[steps].op = VV; \ - expr+=strlen(#VVV); \ + else if (strncmp(expr, #VVV, strlen(#VVV))==0 && ( expr[strlen(#VVV)] == ',' || expr[strlen(#VVV)] == '\0' )){ \ + rpnp[steps].op = VV; \ + expr+=strlen(#VVV); \ }