summaryrefslogtreecommitdiff
path: root/libstore
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-09-23 16:56:40 +0000
committerMiles Bader <miles@gnu.org>1996-09-23 16:56:40 +0000
commit35506d0bdc8d007e56381776c50f77ec79db8e1d (patch)
treea80f6812835c0366bab8f89e9dae90d5361fa7a9 /libstore
parent3ca01ab2b2ada41e580a2818ad672071208ea62b (diff)
(store_decode):
Change CLASSES to be a vector of class pointers.
Diffstat (limited to 'libstore')
-rw-r--r--libstore/decode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libstore/decode.c b/libstore/decode.c
index 5ce4c66e..e21c6e72 100644
--- a/libstore/decode.c
+++ b/libstore/decode.c
@@ -157,7 +157,7 @@ store_with_decoded_runs (struct store_enc *enc, size_t num_runs,
0, STORE_STD_CLASSES is used. If nothing else is to be done with ENC, its
contents may then be freed using store_enc_dealloc. */
error_t
-store_decode (struct store_enc *enc, struct store_class *classes,
+store_decode (struct store_enc *enc, const struct store_class *const *classes,
struct store **store)
{
if (enc->cur_int >= enc->num_ints)
@@ -167,12 +167,14 @@ store_decode (struct store_enc *enc, struct store_class *classes,
if (! classes)
classes = store_std_classes;
- while (classes)
- if (classes->id == enc->ints[enc->cur_int])
- if (classes->decode)
- return (*classes->decode) (enc, classes, store);
+ while (*classes)
+ if ((*classes)->id == enc->ints[enc->cur_int])
+ if ((*classes)->decode)
+ return (*(*classes)->decode) (enc, classes, store);
else
return EOPNOTSUPP;
+ else
+ classes++;
return EINVAL;
}