diff options
author | Dan McGee <dan@archlinux.org> | 2007-04-29 12:03:09 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-04-29 12:03:09 -0400 |
commit | a58e17a1d7a9901bb32277c9aed7edded3501767 (patch) | |
tree | 25209ab6fcfb551da7d55ee9a1e8e0c235511e2d /lib/libalpm/be_files.c | |
parent | ea327cab843397a5727a8a0dd560aab8e0975df6 (diff) | |
download | pacman-a58e17a1d7a9901bb32277c9aed7edded3501767.tar.xz |
Remove STRNCPY macro from libalpm
Replaced calls to the STRNCPY macro with the actual strncpy function, and
pacman passes all pactests.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_files.c')
-rw-r--r-- | lib/libalpm/be_files.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 8c0b3d69..d720268f 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -141,7 +141,7 @@ pmpkg_t *_alpm_db_scan(pmdb_t *db, const char *target) if(stat(path, &sbuf) || !S_ISDIR(sbuf.st_mode)) { continue; } - STRNCPY(name, ent->d_name, PKG_FULLNAME_LEN); + strncpy(name, ent->d_name, PKG_FULLNAME_LEN); /* truncate the string at the second-to-last hyphen, */ /* which will give us the package name */ if((ptr = rindex(name, '-'))) { @@ -733,7 +733,7 @@ int _alpm_db_getlastupdate(pmdb_t *db, char *ts) } else { char line[256]; if(fgets(line, sizeof(line), fp)) { - STRNCPY(ts, line, 15); /* YYYYMMDDHHMMSS */ + strncpy(ts, line, 14); /* YYYYMMDDHHMMSS */ ts[14] = '\0'; } else { fclose(fp); |