summaryrefslogtreecommitdiff
path: root/libstore
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-04-02 22:41:10 +0000
committerMiles Bader <miles@gnu.org>1996-04-02 22:41:10 +0000
commit4f88ddb5d5b2ce24175094a7c350aa073cec4c7e (patch)
treed34954a707120e50b8aa48c8e655518c0e1d56ef /libstore
parent32145142fba4c431048ae49bc81ac990f8693049 (diff)
entered into RCS
Diffstat (limited to 'libstore')
-rw-r--r--libstore/clone.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstore/clone.c b/libstore/clone.c
index a1817982..2550f859 100644
--- a/libstore/clone.c
+++ b/libstore/clone.c
@@ -21,6 +21,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
+#include <stdlib.h>
#include "store.h"
@@ -28,6 +29,7 @@
error_t
store_clone (struct store *from, struct store **to)
{
+ error_t err = 0;
struct store *c =
_make_store (from->class, from->meths, from->port, from->block_size,
from->runs, from->runs_len, from->end);
@@ -56,7 +58,7 @@ store_clone (struct store *from, struct store **to)
err = mach_port_mod_refs (mach_task_self (),
from->source, MACH_PORT_RIGHT_SEND, 1);
if (! err)
- to->source = from->source;
+ c->source = from->source;
}
if (!err && from->meths->clone)