summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--authenticate.c12
-rw-r--r--checksum.c32
-rw-r--r--generator.c2
-rw-r--r--log.c4
-rw-r--r--options.c2
-rw-r--r--rounding.c10
-rw-r--r--uidlist.c4
-rw-r--r--util.c10
8 files changed, 37 insertions, 39 deletions
diff --git a/authenticate.c b/authenticate.c
index f9357524..67c417cc 100644
--- a/authenticate.c
+++ b/authenticate.c
@@ -357,12 +357,12 @@ void auth_client(int fd, const char *user, const char *challenge)
/* XXX: cyeoh says that getpass is deprecated, because
* it may return a truncated password on some systems,
* and it is not in the LSB.
- *
- * Andrew Klein says that getpassphrase() is present
- * on Solaris and reads up to 256 characters.
- *
- * OpenBSD has a readpassphrase() that might be more suitable.
- */
+ *
+ * Andrew Klein says that getpassphrase() is present
+ * on Solaris and reads up to 256 characters.
+ *
+ * OpenBSD has a readpassphrase() that might be more suitable.
+ */
pass = getpass("Password: ");
}
diff --git a/checksum.c b/checksum.c
index 3295252b..b7ea748f 100644
--- a/checksum.c
+++ b/checksum.c
@@ -96,7 +96,7 @@ int csum_len_for_type(int cst, BOOL flist_csum)
int canonical_checksum(int csum_type)
{
- return csum_type >= CSUM_MD4 ? 1 : 0;
+ return csum_type >= CSUM_MD4 ? 1 : 0;
}
/*
@@ -105,20 +105,19 @@ int canonical_checksum(int csum_type)
*/
uint32 get_checksum1(char *buf1, int32 len)
{
- int32 i;
- uint32 s1, s2;
- schar *buf = (schar *)buf1;
-
- s1 = s2 = 0;
- for (i = 0; i < (len-4); i+=4) {
- s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] +
- 10*CHAR_OFFSET;
- s1 += (buf[i+0] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET);
- }
- for (; i < len; i++) {
- s1 += (buf[i]+CHAR_OFFSET); s2 += s1;
- }
- return (s1 & 0xffff) + (s2 << 16);
+ int32 i;
+ uint32 s1, s2;
+ schar *buf = (schar *)buf1;
+
+ s1 = s2 = 0;
+ for (i = 0; i < (len-4); i+=4) {
+ s2 += 4*(s1 + buf[i]) + 3*buf[i+1] + 2*buf[i+2] + buf[i+3] + 10*CHAR_OFFSET;
+ s1 += (buf[i+0] + buf[i+1] + buf[i+2] + buf[i+3] + 4*CHAR_OFFSET);
+ }
+ for (; i < len; i++) {
+ s1 += (buf[i]+CHAR_OFFSET); s2 += s1;
+ }
+ return (s1 & 0xffff) + (s2 << 16);
}
void get_checksum2(char *buf, int32 len, char *sum)
@@ -228,8 +227,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
mdfour_begin(&m);
for (i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) {
- mdfour_update(&m, (uchar *)map_ptr(buf, i, CSUM_CHUNK),
- CSUM_CHUNK);
+ mdfour_update(&m, (uchar *)map_ptr(buf, i, CSUM_CHUNK), CSUM_CHUNK);
}
/* Prior to version 27 an incorrect MD4 checksum was computed
diff --git a/generator.c b/generator.c
index 3857151a..12ad037d 100644
--- a/generator.c
+++ b/generator.c
@@ -114,7 +114,7 @@ static int need_retouch_dir_perms;
static const char *solo_file = NULL;
enum nonregtype {
- TYPE_DIR, TYPE_SPECIAL, TYPE_DEVICE, TYPE_SYMLINK
+ TYPE_DIR, TYPE_SPECIAL, TYPE_DEVICE, TYPE_SYMLINK
};
/* Forward declarations. */
diff --git a/log.c b/log.c
index a86edd74..b9bab811 100644
--- a/log.c
+++ b/log.c
@@ -76,8 +76,8 @@ static int64 initial_data_written;
static int64 initial_data_read;
struct {
- int code;
- char const *name;
+ int code;
+ char const *name;
} const rerr_names[] = {
{ RERR_SYNTAX , "syntax or usage error" },
{ RERR_PROTOCOL , "protocol incompatibility" },
diff --git a/options.c b/options.c
index 92cec4ab..96e5ffba 100644
--- a/options.c
+++ b/options.c
@@ -1804,7 +1804,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
* of any more restrictive ACLs, but this is safe
* for now */
snprintf(err_buf,sizeof(err_buf),
- "ACLs are not supported on this %s\n",
+ "ACLs are not supported on this %s\n",
am_server ? "server" : "client");
return 0;
#endif
diff --git a/rounding.c b/rounding.c
index dfe22da4..c4c29b31 100644
--- a/rounding.c
+++ b/rounding.c
@@ -23,8 +23,8 @@
#define SIZEOF(x) ((long int)sizeof (x))
struct test {
- union file_extras extras[ARRAY_LEN];
- struct file_struct file;
+ union file_extras extras[ARRAY_LEN];
+ struct file_struct file;
};
#define ACTUAL_SIZE SIZEOF(struct test)
@@ -32,7 +32,7 @@ struct test {
int main(UNUSED(int argc), UNUSED(char *argv[]))
{
- static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
- test_array[0] = 0;
- return 0;
+ static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];
+ test_array[0] = 0;
+ return 0;
}
diff --git a/uidlist.c b/uidlist.c
index ae1111bd..98d22952 100644
--- a/uidlist.c
+++ b/uidlist.c
@@ -47,8 +47,8 @@ extern char *groupmap;
#define NFLAGS_NAME_MATCH (1<<1)
union name_or_id {
- const char *name;
- id_t max_id;
+ const char *name;
+ id_t max_id;
};
struct idlist {
diff --git a/util.c b/util.c
index 3e880321..aaf54037 100644
--- a/util.c
+++ b/util.c
@@ -1523,8 +1523,8 @@ uint32 fuzzy_distance(const char *s1, unsigned len1, const char *s2, unsigned le
#define BB_PER_SLOT_INTS (BB_SLOT_SIZE / 4) /* Number of int32s per slot */
struct bitbag {
- uint32 **bits;
- int slot_cnt;
+ uint32 **bits;
+ int slot_cnt;
};
struct bitbag *bitbag_create(int max_ndx)
@@ -1687,7 +1687,7 @@ void *expand_item_list(item_list *lp, size_t item_size,
/* This zeroing of memory won't be optimized away by the compiler. */
void force_memzero(void *buf, size_t len)
{
- volatile uchar *z = buf;
- while (len-- > 0)
- *z++ = '\0';
+ volatile uchar *z = buf;
+ while (len-- > 0)
+ *z++ = '\0';
}