diff options
author | Guillem Jover <guillem@debian.org> | 2009-01-04 17:08:47 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2009-01-04 17:08:47 +0200 |
commit | d6a922fd1d61ea1e0448fb262f1a182cd6268346 (patch) | |
tree | e836492c4c034640ac240246cbc352dfea17b55f /lib | |
parent | 6c0c8c0508720deefac78597fec0563ff084eb46 (diff) | |
download | dpkg-d6a922fd1d61ea1e0448fb262f1a182cd6268346.tar.gz |
libdpkg: Make trig argument in some functions const
And we can thus remove a bogus cast.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dpkg-db.h | 4 | ||||
-rw-r--r-- | lib/triglib.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/dpkg-db.h b/lib/dpkg-db.h index ea758c90b..9111beee2 100644 --- a/lib/dpkg-db.h +++ b/lib/dpkg-db.h @@ -293,8 +293,8 @@ extern struct trig_hooks trigh; void trig_file_activate_byname(const char *trig, struct pkginfo *aw); void trig_file_activate(struct filenamenode *trig, struct pkginfo *aw); -int trig_note_pend_core(struct pkginfo *pend, char *trig /*not copied!*/); -int trig_note_pend(struct pkginfo *pend, char *trig /*not copied!*/); +int trig_note_pend_core(struct pkginfo *pend, const char *trig /*not copied!*/); +int trig_note_pend(struct pkginfo *pend, const char *trig /*not copied!*/); int trig_note_aw(struct pkginfo *pend, struct pkginfo *aw); void trig_clear_awaiters(struct pkginfo *notpend); diff --git a/lib/triglib.c b/lib/triglib.c index fd5f0aaeb..34312bf80 100644 --- a/lib/triglib.c +++ b/lib/triglib.c @@ -75,7 +75,7 @@ illegal_triggername(const char *p) /* aw might be NULL, and trig is not copied! */ static void -trig_record_activation(struct pkginfo *pend, struct pkginfo *aw, char *trig) +trig_record_activation(struct pkginfo *pend, struct pkginfo *aw, const char *trig) { if (pend->status < stat_triggersawaited) /* Not interested then. */ @@ -97,7 +97,7 @@ trig_record_activation(struct pkginfo *pend, struct pkginfo *aw, char *trig) /* NB that this is also called from fields.c where *pend is a temporary! */ int -trig_note_pend_core(struct pkginfo *pend, char *trig /*not copied!*/) +trig_note_pend_core(struct pkginfo *pend, const char *trig /*not copied!*/) { struct trigpend *tp; @@ -115,7 +115,7 @@ trig_note_pend_core(struct pkginfo *pend, char *trig /*not copied!*/) /* Returns: 1 for done, 0 for already noted. */ int -trig_note_pend(struct pkginfo *pend, char *trig /*not copied!*/) +trig_note_pend(struct pkginfo *pend, const char *trig /*not copied!*/) { if (!trig_note_pend_core(pend, trig)) return 0; @@ -566,7 +566,7 @@ trig_file_activate(struct filenamenode *trig, struct pkginfo *aw) for (tfi = *trigh.namenode_interested(trig); tfi; tfi = tfi->samefile_next) - trig_record_activation(tfi->pkg, aw, (char*)trigh.namenode_name(trig)); + trig_record_activation(tfi->pkg, aw, trigh.namenode_name(trig)); } static void |