chiark
/
gitweb
/
~mdw
/
become
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8702965
)
Fix bugs involving empty classes.
author
mdw
<mdw>
Thu, 23 Apr 1998 13:23:56 +0000
(13:23 +0000)
committer
mdw
<mdw>
Thu, 23 Apr 1998 13:23:56 +0000
(13:23 +0000)
src/name.c
patch
|
blob
|
blame
|
history
diff --git
a/src/name.c
b/src/name.c
index 94f1dd8b816d74246fb523d7692ac00576ec5bc3..6599d45b6478f39da99c974c6adea05dd1ebb190 100644
(file)
--- a/
src/name.c
+++ b/
src/name.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: name.c,v 1.
6 1998/01/12 16:46:14
mdw Exp $
+ * $Id: name.c,v 1.
7 1998/04/23 13:23:56
mdw Exp $
*
* Looking up of names in symbol tables
*
*
* Looking up of names in symbol tables
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: name.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: name.c,v $
+ * Revision 1.7 1998/04/23 13:23:56 mdw
+ * Fix bugs involving empty classes.
+ *
* Revision 1.6 1998/01/12 16:46:14 mdw
* Fix copyright date.
*
* Revision 1.6 1998/01/12 16:46:14 mdw
* Fix copyright date.
*
@@
-205,6
+208,8
@@
static void name__groups(void)
if ((pw = userdb_userByName(*p)) != 0)
n->c = class_addUser(n->c, pw->pw_uid);
}
if ((pw = userdb_userByName(*p)) != 0)
n->c = class_addUser(n->c, pw->pw_uid);
}
+ if (!n->c)
+ n->c = class_none;
}
}
}
}
}
}
@@
-441,7
+446,10
@@
void name_dump(void)
trace(TRACE_DEBUG, "name: dumping names");
for (sym_createIter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
trace(TRACE_DEBUG, "name: dumping `%s'", n->base.name);
trace(TRACE_DEBUG, "name: dumping names");
for (sym_createIter(&i, &name__table); (n = sym_next(&i)) != 0; ) {
trace(TRACE_DEBUG, "name: dumping `%s'", n->base.name);
- class_dump(n->c, 1);
+ if (!n->c)
+ trace(TRACE_DEBUG, "name: <empty>");
+ else
+ class_dump(n->c, 1);
}
#endif
}
}
#endif
}
@@
-453,28
+461,32
@@
void name_dump(void)
int main(void)
{
ego("name-test");
int main(void)
{
ego("name-test");
- /* traceon(stdout, TRACE_ALL); */
+ traceon(stdout, TRACE_ALL);
userdb_init();
userdb_local();
userdb_yp();
netg_init();
name_init();
userdb_init();
userdb_local();
userdb_yp();
netg_init();
name_init();
- printf("loaded (%lu)\n", track_memused());
+ /* printf("loaded (%lu)\n", track_memused()); */
+#ifdef notdef
getchar();
for (;;) {
name_end();
netg_end();
userdb_end();
getchar();
for (;;) {
name_end();
netg_end();
userdb_end();
- printf("cleared (%lu)\n", track_memused());
- track_memlist();
+ /* printf("cleared (%lu)\n", track_memused()); */
+ /* track_memlist(); */
userdb_init();
userdb_local();
userdb_yp();
netg_init();
name_init();
userdb_init();
userdb_local();
userdb_yp();
netg_init();
name_init();
- printf("reloaded (%lu)\n", track_memused());
+ /* printf("reloaded (%lu)\n", track_memused()); */
getchar();
}
getchar();
}
+#else
+ name_dump();
+#endif
return (0);
}
return (0);
}