Changeset: 5062fc422595 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5062fc422595 Modified Files: gdk/gdk_heap.c Branch: Nov2019 Log Message:
Remove code that is never executed. diffs (43 lines): diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c --- a/gdk/gdk_heap.c +++ b/gdk/gdk_heap.c @@ -119,35 +119,12 @@ HEAPalloc(Heap *h, size_t nitems, size_t } if (!GDKinmemory() && h->base == NULL) { char *nme; - struct stat st; - if ((nme = GDKfilepath(h->farmid, BATDIR, h->filename, NULL)) == NULL) { + nme = GDKfilepath(h->farmid, BATDIR, h->filename, NULL); + if (nme == NULL) return GDK_FAIL; - } - if (stat(nme, &st) < 0) { - h->storage = STORE_MMAP; - h->base = HEAPcreatefile(NOFARM, &h->size, nme); - } else { - int fd; - - fd = GDKfdlocate(NOFARM, nme, "wb", NULL); - if (fd >= 0) { - char of[sizeof(h->filename)]; - char *ext; - close(fd); - strncpy(of, h->filename, sizeof(of)); -#ifdef STATIC_CODE_ANALYSIS - /* help coverity */ - of[sizeof(h->filename) - 1] = 0; -#endif - ext = decompose_filename(of); - h->newstorage = STORE_MMAP; - if (HEAPload(h, of, ext, false) != GDK_SUCCEED) - h->base = NULL; /* superfluous */ - /* success checked by looking at - * h->base below */ - } - } + h->storage = STORE_MMAP; + h->base = HEAPcreatefile(NOFARM, &h->size, nme); GDKfree(nme); } if (h->base == NULL) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list