This commit is contained in:
Kovid Goyal 2021-08-09 08:37:53 +05:30
parent c838cb03c9
commit b25ea9c863
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -84,7 +84,7 @@ new(PyTypeObject *type, PyObject UNUSED *args, PyObject UNUSED *kwds) {
static int
open_cache_file_without_tmpfile(const char *cache_path) {
int fd = -1;
static const char *template = "%s/disk-cache-XXXXXXXXXXXX";
static const char template[] = "%s/disk-cache-XXXXXXXXXXXX";
const size_t sz = strlen(cache_path) + sizeof(template) + 4;
FREE_AFTER_FUNCTION char *buf = calloc(1, sz);
if (!buf) { errno = ENOMEM; return -1; }