Changeset: d831eff3e996 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d831eff3e996
Modified Files:
        gdk/gdk_logger.c
        gdk/gdk_private.h
        gdk/gdk_storage.c
        gdk/gdk_utils.c
Branch: default
Log Message:

Fix return type.


diffs (68 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1300,7 +1300,7 @@ logger_set_logdir_path(char *filename, c
                char logdir_parent_path[BUFSIZ] = "";
                char logdir_name[BUFSIZ] = "";
                /* split the logdir string into absolute parent dir path and 
(relative) log dir name */
-               if (GDKextractParentAndLastDirFromPath(logdir, 
logdir_parent_path, logdir_name)) {
+               if (GDKextractParentAndLastDirFromPath(logdir, 
logdir_parent_path, logdir_name) == GDK_SUCCEED) {
                        /* set the new relative logdir locaiton including the 
logger function name subdir */
                        snprintf(filename, BUFSIZ, "%s%c%s%c", logdir_name, 
DIR_SEP, fn, DIR_SEP);
 
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -108,7 +108,7 @@ void BBPdump(void);         /* never called: fo
        __attribute__((__visibility__("hidden")));
 __hidden gdk_return GDKextendf(int fd, size_t size, const char *fn)
        __attribute__((__visibility__("hidden")));
-__hidden  int GDKextractParentAndLastDirFromPath(const char *path, char 
*last_dir_parent, char *last_dir)
+__hidden  gdk_return GDKextractParentAndLastDirFromPath(const char *path, char 
*last_dir_parent, char *last_dir)
        __attribute__((__visibility__("hidden")));
 __hidden int GDKfdlocate(int farmid, const char *nme, const char *mode, const 
char *ext)
        __attribute__((__visibility__("hidden")));
diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c
--- a/gdk/gdk_storage.c
+++ b/gdk/gdk_storage.c
@@ -93,7 +93,7 @@ GDKfilepath_long(int farmid, const char 
        char last_dir_parent[BUFSIZ] = "";
        char last_dir[BUFSIZ] = "";
 
-       if (GDKextractParentAndLastDirFromPath(dir, last_dir_parent, last_dir)) 
{
+       if (GDKextractParentAndLastDirFromPath(dir, last_dir_parent, last_dir) 
== GDK_SUCCEED) {
                return GDKfilepath(farmid, last_dir_parent, last_dir, ext);
        }
        return NULL;
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -1882,24 +1882,24 @@ GDKversion(void)
  * the last directory (name) without a leading separators in last_dir.
  * Returns 1 for success, 0 on failure.
  */
-int
+gdk_return
 GDKextractParentAndLastDirFromPath(const char *path, char *last_dir_parent, 
char *last_dir) {
        char *last_dir_with_sep;
        ptrdiff_t last_dirsep_index;
 
        if (path == NULL || *path == 0) {
-               return 0;
+               return GDK_FAIL;
        }
 
        last_dir_with_sep = strrchr(path, DIR_SEP);
        if (last_dir_with_sep == NULL) {
                /* it wasn't a path, can't work with that */
-               return 0;
+               return GDK_FAIL;
        }
        last_dirsep_index = last_dir_with_sep - path;
        /* split the dir string into absolute parent dir path and (relative) 
log dir name */
        strncpy(last_dir, last_dir_with_sep + 1, strlen(path));
        strncpy(last_dir_parent, path, last_dirsep_index);
 
-       return 1;
+       return GDK_SUCCEED;
 }
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to