X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Ftemp%2Fmktemp.c;h=24c858bb18b21e71f6bdce5e08d09afc11b34b18;hp=ed2c103e776ea4fa84edc3f198b33aec30bfbc4e;hb=5afc74fbaa2371f30df0dc9fb7bc3afe6bd96137;hpb=2cc63358cdb0309ca996ffe56ccf402c2f2f16d5 diff --git a/src/temp/mktemp.c b/src/temp/mktemp.c index ed2c103e..24c858bb 100644 --- a/src/temp/mktemp.c +++ b/src/temp/mktemp.c @@ -10,9 +10,8 @@ char *__mktemp(char *template) { size_t l = strlen(template); int retries = 10000; - unsigned long r; - if (l < 6 || strcmp(template+l-6, "XXXXXX")) { + if (l < 6 || memcmp(template+l-6, "XXXXXX", 6)) { errno = EINVAL; *template = 0; return template;