diff options
author | jbj <devnull@localhost> | 1999-06-24 22:23:46 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 1999-06-24 22:23:46 +0000 |
commit | 7f5a4a4aed21b30717605d6e1d7829661476af81 (patch) | |
tree | 813c7dc3a24132990249dcaea046d4ef3716ea89 /rpmio | |
parent | 8bc8f024e61fc218fe8285e33e645a2bb8df7ed6 (diff) | |
download | librpm-tizen-7f5a4a4aed21b30717605d6e1d7829661476af81.tar.gz librpm-tizen-7f5a4a4aed21b30717605d6e1d7829661476af81.tar.bz2 librpm-tizen-7f5a4a4aed21b30717605d6e1d7829661476af81.zip |
fix: bsearch needs macro table sorted after undefine.
CVS patchset: 3109
CVS date: 1999/06/24 22:23:46
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/macro.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/rpmio/macro.c b/rpmio/macro.c index 5d1a71a15..ff2f40d3c 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -1162,13 +1162,17 @@ addMacro(MacroContext *mc, const char *n, const char *o, const char *b, int leve void delMacro(MacroContext *mc, const char *name) { - MacroEntry **mep = findEntry(mc, name, 0); + MacroEntry **mep; if (mc == NULL) mc = &globalMacroContext; /* If name exists, pop entry */ - if ((mep = findEntry(mc, name, 0)) != NULL) + if ((mep = findEntry(mc, name, 0)) != NULL) { popMacro(mep); + /* If deleted name, sort macro table */ + if (!(mep && *mep)) + sortMacroTable(mc); + } } int |