Changeset: bfeb9d10158e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfeb9d10158e
Modified Files:
        gdk/gdk_interprocess.c
        sql/backends/monet5/UDF/pyapi/convert_loops.h
Branch: Jul2017
Log Message:

Use sizeof.


diffs (33 lines):

diff --git a/gdk/gdk_interprocess.c b/gdk/gdk_interprocess.c
--- a/gdk/gdk_interprocess.c
+++ b/gdk/gdk_interprocess.c
@@ -84,7 +84,7 @@ GDKinitmmap(size_t id, size_t size, void
 
        assert(return_ptr != NULL);
 
-       GDKmmapfile(address, 100, id);
+       GDKmmapfile(address, sizeof(address), id);
 
        /* round up to multiple of GDK_mmap_pagesize with a
         * minimum of one
@@ -136,7 +136,7 @@ GDKreleasemmap(void *ptr, size_t size, s
        char address[100];
        char *path;
        int ret;
-       GDKmmapfile(address, 100, id);
+       GDKmmapfile(address, sizeof(address), id);
        if (GDKmunmap(ptr, size) != GDK_SUCCEED) {
                interprocess_create_error("Failure in GDKmunmap: %s", 
strerror(errno));
                return GDK_FAIL;
diff --git a/sql/backends/monet5/UDF/pyapi/convert_loops.h 
b/sql/backends/monet5/UDF/pyapi/convert_loops.h
--- a/sql/backends/monet5/UDF/pyapi/convert_loops.h
+++ b/sql/backends/monet5/UDF/pyapi/convert_loops.h
@@ -109,7 +109,7 @@
                                /* If we are taking data from a MMAP file, set 
the filename to \
                                 * the absolute path */                         
               \
                                char address[100];                              
               \
-                               GDKmmapfile(address, 100, ret->mmap_id);        
               \
+                               GDKmmapfile(address, sizeof(address), 
ret->mmap_id);           \
                                bat->theap.filename =                           
               \
                                        GDKfilepath(NOFARM, BATDIR, address, 
"tmp");               \
                                ret->mmap_id = -1;                              
               \
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to