Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r2494 - branches/fsvs-1.2.x/fsvs/src/hash_ops.c

fsvs
Discussion topic

Back to topic list

svn commit: r2494 - branches/fsvs-1.2.x/fsvs/src/hash_ops.c

Author pmarek
Full name P.Marek
Date 2018-06-05 08:12:21 PDT
Message Author: pmarek
Date: 2018-06-05 07:21:37-0700
New Revision: 2494

Modified:
   branches/fsvs-1.2.x/​fsvs/src/hash_ops.c

Log:
Make strcpy() available; don't pass internal constant to gdbm_open().

Modified: branches/fsvs-1.2.x/​fsvs/src/hash_ops.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/hash_ops.​c?view=diff&path​rev=2494&r1=2493​&r2=2494
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/hash_ops.c (original)
+++ branches/fsvs-1.2.x/​fsvs/src/hash_ops.c 2018-06-05 07:21:37-0700
@@ -7,6 +7,7 @@
  ********************​********************​********************​************/
 
 #include <fcntl.h>
+#include <string.h>
 
 #include "global.h"
 #include "waa.h"
@@ -195,6 +196,8 @@
 
     if (gdbm_mode == HASH_TEMPORARY)
     {
+ /* Replace our own constant with a public available value. */
+ gdbm_mode = GDBM_NEWDB;
         cp=waa_tmp_path;
         /* Use this bit, so that the open filehandle says what it was. */
         eos=waa_tmp_fn;
@@ -205,7 +208,7 @@
                     | waa__get_gwd_flag(name)), NULL);
     strcpy(eos, name);
 
- if (gdbm_mode == GDBM_NEWDB || gdbm_mode == HASH_TEMPORARY)
+ if (gdbm_mode == GDBM_NEWDB)
     {
         /* libgdbm3=1.8.3-3 has a bug - with GDBM_NEWDB an existing database is
          * not truncated. Only the O_CREAT, not the O_TRUNC flag is used.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r2494 - branches/fsvs-1.2.x/fsvs/src/hash_ops.c pmarek P.Marek 2018-06-05 08:12:21 PDT
Messages per page: