From f7912e9dc6be71b177d546da0f8d005e7b4af9e8 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 5 Jun 2007 17:34:33 -0400 Subject: Const correctness! Add some 'const' keywords all over the code to make it a bit more strict on what you can and can't do with data. This is especially important when we return pointers to the pacman frontend- ideally this would always be untouchable data. Signed-off-by: Dan McGee --- lib/libalpm/be_files.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/be_files.c') diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index b936c6b8..2cd14e15 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -715,7 +715,7 @@ int _alpm_db_remove(pmdb_t *db, pmpkg_t *info) * Returns 0 on success, 1 on error * */ -int _alpm_db_getlastupdate(pmdb_t *db, char *ts) +int _alpm_db_getlastupdate(const pmdb_t *db, char *ts) { FILE *fp; char file[PATH_MAX]; @@ -747,7 +747,7 @@ int _alpm_db_getlastupdate(pmdb_t *db, char *ts) /* writes the dbpath/.lastupdate with the contents of *ts */ -int _alpm_db_setlastupdate(pmdb_t *db, char *ts) +int _alpm_db_setlastupdate(const pmdb_t *db, char *ts) { FILE *fp; char file[PATH_MAX]; -- cgit v1.2.3-54-g00ecf