From: Fred Morcos Date: Mon, 2 Dec 2024 07:05:29 +0000 (+0100) Subject: global: Fix whitespace -> tabs X-Git-Tag: 2.4.0~1387 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=646aedfc4f9cb4d2cd2eb9f41c4a68ff5b27fd39;p=thirdparty%2Fdovecot%2Fcore.git global: Fix whitespace -> tabs --- diff --git a/src/lib-index/mail-index-transaction-update.c b/src/lib-index/mail-index-transaction-update.c index 9535b0409c..e0c5434597 100644 --- a/src/lib-index/mail-index-transaction-update.c +++ b/src/lib-index/mail-index-transaction-update.c @@ -157,7 +157,7 @@ void mail_index_update_day_headers(struct mail_index_transaction *t, void mail_index_append(struct mail_index_transaction *t, uint32_t uid, uint32_t *seq_r) { - struct mail_index_record *rec; + struct mail_index_record *rec; i_assert(!t->no_appends); @@ -1017,7 +1017,7 @@ void mail_index_update_ext(struct mail_index_transaction *t, uint32_t seq, uint32_t ext_id, const void *data, void *old_data_r) { struct mail_index *index = t->view->index; - const struct mail_index_registered_ext *rext; + const struct mail_index_registered_ext *rext; const struct mail_transaction_ext_intro *intro; uint16_t record_size; ARRAY_TYPE(seq_array) *array; diff --git a/src/lib-index/mail-index-util.c b/src/lib-index/mail-index-util.c index b61cf8d32f..a865cea4c8 100644 --- a/src/lib-index/mail-index-util.c +++ b/src/lib-index/mail-index-util.c @@ -139,7 +139,7 @@ bool mail_index_seq_array_add(ARRAY_TYPE(seq_array) *array, uint32_t seq, return TRUE; } else { /* insert */ - p = array_insert_space(array, idx); + p = array_insert_space(array, idx); memcpy(p, &seq, sizeof(seq)); memcpy(PTR_OFFSET(p, sizeof(seq)), record, record_size); return FALSE; diff --git a/src/lib-index/mail-index.c b/src/lib-index/mail-index.c index e6be908bbf..f6b73f381f 100644 --- a/src/lib-index/mail-index.c +++ b/src/lib-index/mail-index.c @@ -308,7 +308,7 @@ void mail_index_ext_register_resize_defaults(struct mail_index *index, bool mail_index_ext_lookup(struct mail_index *index, const char *name, uint32_t *ext_id_r) { - const struct mail_index_registered_ext *extensions; + const struct mail_index_registered_ext *extensions; unsigned int i, count; extensions = array_get(&index->extensions, &count); @@ -488,7 +488,7 @@ int mail_index_try_open_only(struct mail_index *index) i_assert(index->fd == -1); i_assert(!MAIL_INDEX_IS_IN_MEMORY(index)); - /* Note that our caller must close index->fd by itself. */ + /* Note that our caller must close index->fd by itself. */ if (index->readonly) errno = EACCES; else { @@ -518,7 +518,7 @@ mail_index_try_open(struct mail_index *index) { int ret; - i_assert(index->fd == -1); + i_assert(index->fd == -1); if (MAIL_INDEX_IS_IN_MEMORY(index)) return 0; @@ -538,7 +538,7 @@ mail_index_try_open(struct mail_index *index) int mail_index_create_tmp_file(struct mail_index *index, const char *path_prefix, const char **path_r) { - mode_t old_mask; + mode_t old_mask; const char *path; int fd; diff --git a/src/lib-index/mail-index.h b/src/lib-index/mail-index.h index f296c293d0..e3f6baf0d3 100644 --- a/src/lib-index/mail-index.h +++ b/src/lib-index/mail-index.h @@ -187,7 +187,7 @@ struct mail_keywords { unsigned int count; int refcount; - /* variable sized list of keyword indexes */ + /* variable sized list of keyword indexes */ unsigned int idx[FLEXIBLE_ARRAY_MEMBER]; }; diff --git a/src/lib/array.h b/src/lib/array.h index 6558c1cc29..4de3513ee5 100644 --- a/src/lib/array.h +++ b/src/lib/array.h @@ -31,10 +31,10 @@ struct foo *foo = array_idx(foos, 0); } struct foo_manager { - ARRAY_TYPE(foo) foos; // pedantically, ARRAY(struct foo) is a different type + ARRAY_TYPE(foo) foos; // pedantically, ARRAY(struct foo) is a different type }; // ... - do_foo(&my_foo_manager->foos); // No compiler warning about mismatched types + do_foo(&my_foo_manager->foos); // No compiler warning about mismatched types */ #include "array-decl.h" diff --git a/src/lib/buffer.c b/src/lib/buffer.c index a3ba1d66c4..c85f1e61db 100644 --- a/src/lib/buffer.c +++ b/src/lib/buffer.c @@ -507,4 +507,3 @@ buffer_truncate_rshift_bits(buffer_t *buf, size_t bits) buffer_set_used_size(buf, 0); } } - diff --git a/src/lib/file-dotlock.c b/src/lib/file-dotlock.c index ad14ef0ff0..29901bf315 100644 --- a/src/lib/file-dotlock.c +++ b/src/lib/file-dotlock.c @@ -366,7 +366,7 @@ static int try_create_lock_hardlink(struct lock_info *lock_info, bool write_pid, } } - lock_info->temp_path = str_c(tmp_path); + lock_info->temp_path = str_c(tmp_path); } else if (fstat(lock_info->fd, &st) < 0) { i_error("fstat(%s) failed: %m", lock_info->temp_path); return -1; @@ -577,7 +577,7 @@ dotlock_create(struct dotlock *dotlock, enum dotlock_create_flags flags, dotlock->ino = st.st_ino; dotlock->fd = lock_info.fd; - dotlock->lock_time = now; + dotlock->lock_time = now; lock_info.fd = -1; if (st.st_ctime + MAX_TIME_DIFF < now || @@ -722,7 +722,7 @@ int file_dotlock_delete(struct dotlock **dotlock_p) { struct dotlock *dotlock; const char *lock_path; - struct stat st; + struct stat st; int ret; dotlock = *dotlock_p; diff --git a/src/lib/lib.h b/src/lib/lib.h index 474fbf190b..5d6e35038d 100644 --- a/src/lib/lib.h +++ b/src/lib/lib.h @@ -128,12 +128,12 @@ uint32_t i_rand_limit(uint32_t upper_bound); static inline unsigned short i_rand_ushort(void) { - return i_rand_limit(USHRT_MAX + 1); + return i_rand_limit(USHRT_MAX + 1); } static inline unsigned char i_rand_uchar(void) { - return i_rand_limit(UCHAR_MAX + 1); + return i_rand_limit(UCHAR_MAX + 1); } /* Returns a random integer >= min_val, and <= max_val. */ @@ -177,7 +177,7 @@ static inline int i_faccessat2(int fd, const char *file, int type, int flag) return ret; } #endif - return faccessat(fd, file, type, flag); + return faccessat(fd, file, type, flag); } #endif diff --git a/src/lib/net.c b/src/lib/net.c index 5ef450af07..d657882d39 100644 --- a/src/lib/net.c +++ b/src/lib/net.c @@ -104,7 +104,7 @@ int net_ip_cmp(const struct ip_addr *ip1, const struct ip_addr *ip2) unsigned int net_ip_hash(const struct ip_addr *ip) { - const unsigned char *p; + const unsigned char *p; unsigned int len, g, h = 0; if (ip->family == AF_INET6) { @@ -165,7 +165,7 @@ sin_get_ip(const union sockaddr_union *so, struct ip_addr *ip) static inline void sin_set_port(union sockaddr_union *so, in_port_t port) { if (so->sin.sin_family == AF_INET6) - so->sin6.sin6_port = htons(port); + so->sin6.sin6_port = htons(port); else if (so->sin.sin_family == AF_INET) so->sin.sin_port = htons(port); else @@ -190,12 +190,12 @@ static int net_connect_ip_once(const struct ip_addr *ip, in_port_t port, if (my_ip != NULL && ip->family != my_ip->family) { i_warning("net_connect_ip(): ip->family != my_ip->family"); - my_ip = NULL; + my_ip = NULL; } /* create the socket */ i_zero(&so); - so.sin.sin_family = ip->family; + so.sin.sin_family = ip->family; fd = socket(ip->family, sock_type, 0); if (fd == -1) { @@ -231,7 +231,7 @@ static int net_connect_ip_once(const struct ip_addr *ip, in_port_t port, if (ret < 0 && WSAGetLastError() != WSAEWOULDBLOCK) #endif { - i_close_fd(&fd); + i_close_fd(&fd); return -1; } @@ -286,7 +286,7 @@ int net_try_bind(const struct ip_addr *ip) /* create the socket */ i_zero(&so); - so.sin.sin_family = ip->family; + so.sin.sin_family = ip->family; fd = socket(ip->family, SOCK_STREAM, 0); if (fd == -1) { i_error("socket() failed: %m"); @@ -331,7 +331,7 @@ int net_connect_unix(const char *path) /* connect */ ret = connect(fd, &sa.sa, sizeof(sa)); if (ret < 0 && errno != EINPROGRESS) { - i_close_fd(&fd); + i_close_fd(&fd); return -1; } @@ -531,7 +531,7 @@ int net_listen_full(const struct ip_addr *my_ip, in_port_t *port, } } - /* error */ + /* error */ i_close_fd(&fd); return -1; } @@ -664,7 +664,7 @@ ssize_t net_receive(int fd, void *buf, size_t len) return 0; if (errno == ECONNRESET || errno == ETIMEDOUT) { - /* treat as disconnection */ + /* treat as disconnection */ return -2; } } @@ -680,10 +680,10 @@ int net_gethostbyname(const char *addr, struct ip_addr **ips, struct addrinfo hints, *ai, *origai; struct ip_addr ip; int host_error; - int count; + int count; *ips = NULL; - *ips_count = 0; + *ips_count = 0; /* support [ipv6] style addresses here so they work globally */ if (addr[0] == '[' && net_addr2ip(addr, &ip) == 0) { @@ -704,16 +704,16 @@ int net_gethostbyname(const char *addr, struct ip_addr **ips, return host_error; } - /* get number of IPs */ - origai = ai; + /* get number of IPs */ + origai = ai; for (count = 0; ai != NULL; ai = ai->ai_next) count++; i_assert(count > 0); - *ips_count = count; - *ips = t_new(struct ip_addr, count); + *ips_count = count; + *ips = t_new(struct ip_addr, count); - count = 0; + count = 0; for (ai = origai; ai != NULL; ai = ai->ai_next, count++) { so = (union sockaddr_union *) ai->ai_addr;