[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/7] maint: rename variables for clarity...
From: |
Jim Meyering |
Subject: |
[PATCH 2/7] maint: rename variables for clarity... |
Date: |
Mon, 11 Apr 2011 19:45:58 +0200 |
From: Jim Meyering <address@hidden>
and to avoid a false-positive "TO to" in new doubled word check.
* src/install.c (change_timestamps): Rename parameters for
readability. Make the comment match the code.
---
src/install.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/install.c b/src/install.c
index cebb642..f416996 100644
--- a/src/install.c
+++ b/src/install.c
@@ -813,19 +813,19 @@ change_attributes (char const *name)
return ok;
}
-/* Set the timestamps of file TO to match those of file FROM.
+/* Set the timestamps of file DEST to match those of SRC_SB.
Return true if successful. */
static bool
-change_timestamps (struct stat const *from_sb, char const *to)
+change_timestamps (struct stat const *src_sb, char const *dest)
{
struct timespec timespec[2];
- timespec[0] = get_stat_atime (from_sb);
- timespec[1] = get_stat_mtime (from_sb);
+ timespec[0] = get_stat_atime (src_sb);
+ timespec[1] = get_stat_mtime (src_sb);
- if (utimens (to, timespec))
+ if (utimens (dest, timespec))
{
- error (0, errno, _("cannot set time stamps for %s"), quote (to));
+ error (0, errno, _("cannot set time stamps for %s"), quote (dest));
return false;
}
return true;
--
1.7.5.rc1.228.g86d60b
- a few small changes, Jim Meyering, 2011/04/11
- [PATCH 5/7] doc: tweak NEWS, Jim Meyering, 2011/04/11
- [PATCH 1/7] maint: remove doubled words in comments, e.g., s/to to/to/, Jim Meyering, 2011/04/11
- [PATCH 4/7] maint: install: remove support for --preserve_context ("_", not "-"), Jim Meyering, 2011/04/11
- [PATCH 3/7] maint: reorder install.c to eliminate declarations of static functions, Jim Meyering, 2011/04/11
- [PATCH 7/7] build: update gnulib submodule to latest, Jim Meyering, 2011/04/11
- [PATCH 2/7] maint: rename variables for clarity...,
Jim Meyering <=
- [PATCH 6/7] cfg.mk: remove useless semicolon and backslash, Jim Meyering, 2011/04/12