]> git.itanic.dy.fi Git - rrdd/blobdiff - rrdtool.c
rrdtool_draw_image: Remove excess strlen() call
[rrdd] / rrdtool.c
index c8754176fd66ac6855422356914103e7af6b1b47..9fed184cce5e649c6072973b417e3c24da4a594f 100644 (file)
--- a/rrdtool.c
+++ b/rrdtool.c
@@ -48,8 +48,8 @@ int rrdtool_draw_image(struct rrd_image *image)
        pr_info("Drawing image %s\n", image->image_filename);
 
        tmpfile[0] = 0;
-       strncat(tmpfile, image->image_filename, sizeof(tmp) - strlen(tmp) - 1);
-       strncat(tmpfile, ".tmp", sizeof(tmp) - strlen(tmp) - 1);
+       strncat(tmpfile, image->image_filename, sizeof(tmp) - 1);
+       strncat(tmpfile, ".tmp", sizeof(tmp) - 1);
 
        if (image->updatestr)
                updatestr = image->updatestr;