summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index dd99313a..1651304f 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -349,7 +349,7 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
info->reason = PM_PKG_REASON_DEPEND;
}*/
/* make an install date (in UTC) */
- strncpy(info->installdate, asctime(gmtime(&t)), sizeof(info->installdate));
+ STRNCPY(info->installdate, asctime(gmtime(&t)), sizeof(info->installdate));
if(db_write(db, info, INFRQ_ALL)) {
_alpm_log(PM_LOG_ERROR, "could not update database entry %s/%s-%s", db->treename, info->name, info->version);
alpm_logaction(NULL, "error updating database for %s-%s!", info->name, info->version);
@@ -415,7 +415,7 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
char pathname[PATH_MAX];
struct stat buf;
- strncpy(pathname, th_get_pathname(tar), PATH_MAX);
+ STRNCPY(pathname, th_get_pathname(tar), PATH_MAX);
if(!strcmp(pathname, ".PKGINFO") || !strcmp(pathname, ".FILELIST")) {
tar_skip_regfile(tar);