summaryrefslogtreecommitdiff
path: root/libstore
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2003-08-02 22:02:03 +0000
committerMarcus Brinkmann <marcus@gnu.org>2003-08-02 22:02:03 +0000
commit0ed0f028e849509fe892cd7061617f8ad5eb3dff (patch)
tree5584e7b40824b175c4dac79c635a39e8ba252967 /libstore
parentd74850a770b15db3c6d2fbae3f85b3318b1d5aa3 (diff)
2003-08-02 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
* module.c (store_module_open): NAME that doesn't contain ':' is not considered invalid argument, but a class name without class-specific portion. * typed.c (store_typed_open): When NAME is empty string, don't invoke store_open (name + 1, ...).
Diffstat (limited to 'libstore')
-rw-r--r--libstore/ChangeLog8
-rw-r--r--libstore/module.c7
-rw-r--r--libstore/typed.c4
3 files changed, 12 insertions, 7 deletions
diff --git a/libstore/ChangeLog b/libstore/ChangeLog
index bf2fa368..35d57ca8 100644
--- a/libstore/ChangeLog
+++ b/libstore/ChangeLog
@@ -1,3 +1,11 @@
+2003-08-02 Ognyan Kulev <ogi@fmi.uni-sofia.bg>
+
+ * module.c (store_module_open): NAME that doesn't contain ':' is
+ not considered invalid argument, but a class name without
+ class-specific portion.
+ * typed.c (store_typed_open): When NAME is empty string, don't
+ invoke store_open (name + 1, ...).
+
2002-10-01 Ludovic Courtès <ludovic.courtes@utbm.fr>
* store.h: New type store_set_size_meth_t: New type. New
diff --git a/libstore/module.c b/libstore/module.c
index 1fcdf544..6e75099a 100644
--- a/libstore/module.c
+++ b/libstore/module.c
@@ -1,5 +1,5 @@
/* Dynamic loading of store class modules
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
@@ -97,12 +97,9 @@ store_module_open (const char *name, int flags,
struct store **store)
{
const struct store_class *cl;
- const char *clname_end = strchr (name, ':');
+ const char *clname_end = strchrnul (name, ':');
error_t err;
- if (! clname_end)
- return EINVAL;
-
err = open_class (1, name, clname_end, &cl);
if (err)
return err;
diff --git a/libstore/typed.c b/libstore/typed.c
index 822f23f8..42b27bd5 100644
--- a/libstore/typed.c
+++ b/libstore/typed.c
@@ -1,6 +1,6 @@
/* Support for opening `typed' stores
- Copyright (C) 1997,98,2001,02 Free Software Foundation, Inc.
+ Copyright (C) 1997,98,2001,02,03 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.org>
This file is part of the GNU Hurd.
@@ -113,7 +113,7 @@ store_typed_open (const char *name, int flags,
const struct store_class *cl;
const char *clname_end = strchrnul (name, ':');
- if (clname_end == name)
+ if (clname_end == name && *clname_end)
/* Open NAME with store_open. */
return store_open (name + 1, flags, classes, store);