]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Better fix for the strchr
authormmj <none@none>
Thu, 11 Nov 2004 13:34:03 +0000 (00:34 +1100)
committermmj <none@none>
Thu, 11 Nov 2004 13:34:03 +0000 (00:34 +1100)
src/prepstdreply.c

index 3e5311ca39a6802dfad3ba183753441212b360f0..668984bbe3af1e0143376666880f03539beafd8a 100644 (file)
@@ -47,10 +47,8 @@ char *substitute(const char *line, const char *listaddr, size_t datacount,
        size_t len, i;
        
        d1 = strchr(origline, '$');
-       if(d1)
-               d2 = strchr(d1 + 1, '$');
-       else
-               d2 = NULL;
+       if(d1 == NULL)
+               return origline;
        
        if(d1 && d2) {
                len = d2 - d1;