projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix poorly copied comment.
[u/mdw/catacomb]
/
key-data.c
diff --git
a/key-data.c
b/key-data.c
index
5da8b38
..
2a57cf2
100644
(file)
--- a/
key-data.c
+++ b/
key-data.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: key-data.c,v 1.
2 2000/02/12 18:21:02
mdw Exp $
+ * $Id: key-data.c,v 1.
4 2000/07/16 19:51:58
mdw Exp $
*
* Encoding and decoding of key data
*
*
* Encoding and decoding of key data
*
@@
-30,6
+30,13
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: key-data.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: key-data.c,v $
+ * Revision 1.4 2000/07/16 19:51:58 mdw
+ * Shut stupid compiler up.
+ *
+ * Revision 1.3 2000/06/17 11:26:03 mdw
+ * key_structfind: track minor data structure change, and cope if the
+ * subkey isn't available.
+ *
* Revision 1.2 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
* Revision 1.2 2000/02/12 18:21:02 mdw
* Overhaul of key management (again).
*
@@
-138,8
+145,11
@@
void key_structure(key_data *k)
key_data *key_structfind(key_data *k, const char *tag)
{
key_struct *ks;
key_data *key_structfind(key_data *k, const char *tag)
{
key_struct *ks;
- assert(((void)"Key is not structured", k->e == KENC_STRUCT));
+ assert(((void)"Key is not structured",
+ (k->e & KF_ENCMASK) == KENC_STRUCT));
ks = sym_find(&k->u.s, tag, -1, 0, 0);
ks = sym_find(&k->u.s, tag, -1, 0, 0);
+ if (!ks)
+ return (0);
return (&ks->k);
}
return (&ks->k);
}
@@
-226,7
+236,7
@@
int key_do(key_data *k, const key_filter *kf, dstr *d,
else {
sym_iter i;
key_struct *ks;
else {
sym_iter i;
key_struct *ks;
- size_t n;
+ size_t n
= 0
;
int rc;
if (d)
int rc;
if (d)