···11+--- tools/rlecat.c
22++++ tools/rlecat.c
33+@@ -110,8 +110,14 @@
44+ nflag = 0; /* Not really repeating! */
55+ else
66+ {
77+- mktemp( temp ); /* Make a temporary file name */
88+- tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" );
99++ /* we dont have to use rle_open_f() because all it does in
1010++ * this case is run fopen() ... we're creating a file so all
1111++ * the checks for opening an existing file aren't needed */
1212++ int fd = mkstemp(temp);
1313++ if (fd == -1 || (tmpfile = fdopen(fd, "w+")) == NULL) {
1414++ perror("Unable to open tempfile");
1515++ exit(-1);
1616++ }
1717+ }
1818+ }
1919+