strncat is already good enough ensuring target buffer will not
overflow. There is no need to use strlen at all.
Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
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;