Changeset: 82ae5357b533 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=82ae5357b533
Modified Files:
        gdk/gdk_heap.c
Branch: Jul2012
Log Message:

Simplify code.
This is not coveriy-proof.


diffs (23 lines):

diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -613,7 +613,6 @@ HEAPload_intern(Heap *h, const char *nme
        int ret = 0, desc_status = 0;
        long_str srcpath, dstpath;
        struct stat st;
-       char *p;
 
        h->storage = h->newstorage;
        h->maxsize = h->size;
@@ -654,9 +653,8 @@ HEAPload_intern(Heap *h, const char *nme
           This file, if present, takes precedence. */
        GDKfilepath(srcpath, BATDIR, nme, ext);
        GDKfilepath(dstpath, BATDIR, nme, ext);
-       for (p = srcpath; *p; p++)
-               ;
-       strcpy(p, suffix);
+       assert(strlen(srcpath) + strlen(suffix) < sizeof(srcpath));
+       strcat(srcpath, suffix);
        ret = stat(dstpath, &st);
        if (stat(srcpath, &st) == 0) {
                int t0;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to