summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hedenfal <martinh@cvs.openbsd.org>2010-05-31 18:29:05 +0000
committerMartin Hedenfal <martinh@cvs.openbsd.org>2010-05-31 18:29:05 +0000
commitc185fe4d41589f430e852a957e96b759f757c5a2 (patch)
tree69ac44124cd1d0b183ccd5c1a831623f77e0efb0
parentdfe8c47b7e6355b03bc11e72dfb83a0909696888 (diff)
Remove trailing whitespace and spaces before tabs.
ok gilles@
-rw-r--r--usr.sbin/ldapd/btree.c14
-rw-r--r--usr.sbin/ldapd/compact.c4
-rw-r--r--usr.sbin/ldapd/conn.c4
-rw-r--r--usr.sbin/ldapd/index.c4
-rw-r--r--usr.sbin/ldapd/ldapd.c4
-rw-r--r--usr.sbin/ldapd/ldape.c4
-rw-r--r--usr.sbin/ldapd/parse.y6
-rw-r--r--usr.sbin/ldapd/search.c6
-rw-r--r--usr.sbin/ldapd/ssl.c8
-rw-r--r--usr.sbin/ldapd/ssl_privsep.c24
-rw-r--r--usr.sbin/ldapd/uuid.c18
11 files changed, 48 insertions, 48 deletions
diff --git a/usr.sbin/ldapd/btree.c b/usr.sbin/ldapd/btree.c
index 45a1317142c..90997c22d98 100644
--- a/usr.sbin/ldapd/btree.c
+++ b/usr.sbin/ldapd/btree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: btree.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: btree.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -323,8 +323,8 @@ memnrcmp(const void *s1, size_t n1, const void *s2, size_t n2)
if (n2 == 0)
return n1 == 0 ? 0 : 1;
- p1 = (const unsigned char *)s1 + n1 - 1;
- p2 = (const unsigned char *)s2 + n2 - 1;
+ p1 = (const unsigned char *)s1 + n1 - 1;
+ p2 = (const unsigned char *)s2 + n2 - 1;
while (*p1 == *p2) {
if (p1 == s1)
@@ -374,7 +374,7 @@ common_prefix(struct btree *bt, struct btkey *min, struct btkey *max,
} else {
p1 = min->str;
p2 = max->str;
-
+
while (*p1 == *p2) {
if (n == min->len || n == max->len)
break;
@@ -689,7 +689,7 @@ btree_txn_commit(struct btree_txn *txn)
assert(txn != NULL);
assert(txn->bt != NULL);
- bt = txn->bt;
+ bt = txn->bt;
if (F_ISSET(txn->flags, BT_TXN_RDONLY)) {
DPRINTF("attempt to commit read-only transaction");
@@ -2430,7 +2430,7 @@ bt_reduce_separator(struct btree *bt, struct node *min, struct btval *sep)
p1 = (char *)NODEKEY(min) + min->ksize - 1;
p2 = (char *)sep->data + sep->size - 1;
-
+
while (p1 >= (char *)NODEKEY(min) && *p1 == *p2) {
assert(p2 > (char *)sep->data);
p1--;
@@ -2447,7 +2447,7 @@ bt_reduce_separator(struct btree *bt, struct node *min, struct btval *sep)
p1 = (char *)NODEKEY(min);
p2 = (char *)sep->data;
-
+
while (*p1 == *p2) {
p1++;
p2++;
diff --git a/usr.sbin/ldapd/compact.c b/usr.sbin/ldapd/compact.c
index 700da0ba8be..8afd55e0ff8 100644
--- a/usr.sbin/ldapd/compact.c
+++ b/usr.sbin/ldapd/compact.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: compact.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: compact.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martin@bzero.se>
@@ -115,7 +115,7 @@ again:
namespace_queue_schedule(c->ns);
if (c->all) {
- /* Proceed with the next namespace that isn't
+ /* Proceed with the next namespace that isn't
* already being compacted or indexed.
*/
while ((c->ns = TAILQ_NEXT(c->ns, next)) != NULL) {
diff --git a/usr.sbin/ldapd/conn.c b/usr.sbin/ldapd/conn.c
index f21a04e5c4b..1204dd6dec3 100644
--- a/usr.sbin/ldapd/conn.c
+++ b/usr.sbin/ldapd/conn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conn.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: conn.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -237,7 +237,7 @@ conn_accept(int fd, short why, void *data)
struct sockaddr_storage remote_addr;
char host[128];
- addrlen = sizeof(remote_addr);
+ addrlen = sizeof(remote_addr);
afd = accept(fd, (struct sockaddr *)&remote_addr, &addrlen);
if (afd == -1) {
log_warn("accept");
diff --git a/usr.sbin/ldapd/index.c b/usr.sbin/ldapd/index.c
index 63728e84e9b..9db1d2feb40 100644
--- a/usr.sbin/ldapd/index.c
+++ b/usr.sbin/ldapd/index.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: index.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: index.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se>
@@ -67,7 +67,7 @@
* @ou=people,cn=chunky bacon
* @ou=people,cn=chunky beans
* @ou=people,cn=crispy bacon
- *
+ *
*/
#include <sys/types.h>
diff --git a/usr.sbin/ldapd/ldapd.c b/usr.sbin/ldapd/ldapd.c
index 2ad516a4988..8069df7cd8d 100644
--- a/usr.sbin/ldapd/ldapd.c
+++ b/usr.sbin/ldapd/ldapd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldapd.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: ldapd.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -229,7 +229,7 @@ void
imsg_event_add(struct imsgev *iev)
{
iev->events = EV_READ;
- if (iev->ibuf.w.queued)
+ if (iev->ibuf.w.queued)
iev->events |= EV_WRITE;
if (event_initialized(&iev->ev))
diff --git a/usr.sbin/ldapd/ldape.c b/usr.sbin/ldapd/ldape.c
index 95b70ac93c6..4071d9fe8a7 100644
--- a/usr.sbin/ldapd/ldape.c
+++ b/usr.sbin/ldapd/ldape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldape.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: ldape.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -163,7 +163,7 @@ ldap_extended(struct request *req)
char *oid = NULL;
struct ber_element *ext_val = NULL;
struct {
- const char *oid;
+ const char *oid;
int (*fn)(struct request *);
} extended_ops[] = {
{ "1.3.6.1.4.1.1466.20037", ldap_starttls },
diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y
index fd201cd420a..89d0b82423a 100644
--- a/usr.sbin/ldapd/parse.y
+++ b/usr.sbin/ldapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: parse.y,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009 Martin Hedenfalk <martin@bzero.se>
@@ -382,7 +382,7 @@ attr_type : ATTRIBUTETYPE '(' numericoid {
free($3);
YYERROR;
}
- cattr->oid = $3;
+ cattr->oid = $3;
p = RB_INSERT(attr_type_tree, &conf->attr_types, cattr);
if (p != NULL) {
yyerror("attribute '%s' already defined", $3);
@@ -432,7 +432,7 @@ object : OBJECTCLASS '(' numericoid {
free($3);
YYERROR;
}
- cobj->oid = $3;
+ cobj->oid = $3;
p = RB_INSERT(object_tree, &conf->objects, cobj);
if (p != NULL) {
yyerror("object '%s' already defined", $3);
diff --git a/usr.sbin/ldapd/search.c b/usr.sbin/ldapd/search.c
index 48c1df449b0..5ee50e010db 100644
--- a/usr.sbin/ldapd/search.c
+++ b/usr.sbin/ldapd/search.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: search.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: search.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
@@ -418,7 +418,7 @@ conn_search(struct search *search)
/* Check if we have passed the size limit. */
if (rc == BT_SUCCESS && search->szlim > 0 &&
search->nmatched >= search->szlim) {
- log_debug("search %i/%i has reached size limit (%u)",
+ log_debug("search %i/%i has reached size limit (%u)",
search->conn->fd, search->req->msgid,
search->szlim);
reason = LDAP_SIZELIMIT_EXCEEDED;
@@ -430,7 +430,7 @@ conn_search(struct search *search)
now = time(0);
if (rc == 0 && search->tmlim > 0 &&
search->started_at + search->tmlim <= now) {
- log_debug("search %i/%i has reached time limit (%u)",
+ log_debug("search %i/%i has reached time limit (%u)",
search->conn->fd, search->req->msgid,
search->tmlim);
reason = LDAP_TIMELIMIT_EXCEEDED;
diff --git a/usr.sbin/ldapd/ssl.c b/usr.sbin/ldapd/ssl.c
index 7d320bf6b93..71744c203a0 100644
--- a/usr.sbin/ldapd/ssl.c
+++ b/usr.sbin/ldapd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: ssl.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -80,7 +80,7 @@ unsigned char dh512_p[] = {
0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3,
0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12,
0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C,
- 0x47,0x74,0xE8,0x33,
+ 0x47,0x74,0xE8,0x33,
};
unsigned char dh512_g[] = {
@@ -669,7 +669,7 @@ ssl_buf_write(SSL *s, struct msgbuf *msgbuf)
{
struct ibuf *buf;
int ret;
-
+
buf = TAILQ_FIRST(&msgbuf->bufs);
if (buf == NULL)
return (SSL_ERROR_NONE);
@@ -686,7 +686,7 @@ DH *
get_dh512(void)
{
DH *dh;
-
+
if ((dh = DH_new()) == NULL)
return NULL;
diff --git a/usr.sbin/ldapd/ssl_privsep.c b/usr.sbin/ldapd/ssl_privsep.c
index 924e7b50c00..d3508915d4d 100644
--- a/usr.sbin/ldapd/ssl_privsep.c
+++ b/usr.sbin/ldapd/ssl_privsep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_privsep.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: ssl_privsep.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
@@ -131,18 +131,18 @@ ssl_ctx_load_verify_memory(SSL_CTX *ctx, char *buf, off_t len)
{
X509_LOOKUP *lu;
struct iovec iov;
-
+
if ((lu = X509_STORE_add_lookup(ctx->cert_store,
&x509_mem_lookup)) == NULL)
return (0);
-
+
iov.iov_base = buf;
iov.iov_len = len;
-
+
if (!ssl_by_mem_ctrl(lu, X509_L_ADD_MEM,
(const char *)&iov, X509_FILETYPE_PEM, NULL))
return (0);
-
+
return (1);
}
@@ -155,18 +155,18 @@ ssl_by_mem_ctrl(X509_LOOKUP *lu, int cmd, const char *buf,
X509_INFO *itmp;
BIO *in = NULL;
int i, count = 0;
-
+
iov = (const struct iovec *)buf;
-
+
if (type != X509_FILETYPE_PEM)
goto done;
-
+
if ((in = BIO_new_mem_buf(iov->iov_base, iov->iov_len)) == NULL)
goto done;
-
+
if ((inf = PEM_X509_INFO_read_bio(in, NULL, NULL, NULL)) == NULL)
goto done;
-
+
for(i = 0; i < sk_X509_INFO_num(inf); i++) {
itmp = sk_X509_INFO_value(inf, i);
if(itmp->x509) {
@@ -179,11 +179,11 @@ ssl_by_mem_ctrl(X509_LOOKUP *lu, int cmd, const char *buf,
}
}
sk_X509_INFO_pop_free(inf, X509_INFO_free);
-
+
done:
if (!count)
X509err(X509_F_X509_LOAD_CERT_CRL_FILE,ERR_R_PEM_LIB);
-
+
if (in != NULL)
BIO_free(in);
return (count);
diff --git a/usr.sbin/ldapd/uuid.c b/usr.sbin/ldapd/uuid.c
index 4b59d29ba7d..40040adca1b 100644
--- a/usr.sbin/ldapd/uuid.c
+++ b/usr.sbin/ldapd/uuid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uuid.c,v 1.1 2010/05/31 17:36:31 martinh Exp $ */
+/* $OpenBSD: uuid.c,v 1.2 2010/05/31 18:29:04 martinh Exp $ */
/*
* Copyright (c) 2002, Stockholms Universitet
* (Stockholm University, Stockholm Sweden)
@@ -35,7 +35,7 @@
/*
* NCS/DCE/AFS/GUID generator
*
- * for more information about DCE UUID, see
+ * for more information about DCE UUID, see
* <http://www.opengroup.org/onlinepubs/9629399/apdxa.htm>
*
* Note, the Microsoft GUID is a DCE UUID, but it seems like they
@@ -116,7 +116,7 @@ get_node_addr(char *addr)
found_mac = 1;
}
}
-
+
}
#endif
default:
@@ -153,7 +153,7 @@ uuid_compare(const afsUUID *uuid1, const afsUUID *uuid2)
/*
* Creates a new UUID.
*/
-
+
int
uuid_create(afsUUID *uuid)
{
@@ -193,13 +193,13 @@ uuid_create(afsUUID *uuid)
got_time = 1;
} else {
#define UUID_MAX_HZ (1) /* make this bigger fix you have larger tickrate */
-#define MULTIPLIER_100_NANO_SEC 10
- if (++counter < UUID_MAX_HZ * MULTIPLIER_100_NANO_SEC)
+#define MULTIPLIER_100_NANO_SEC 10
+ if (++counter < UUID_MAX_HZ * MULTIPLIER_100_NANO_SEC)
got_time = 1;
}
} while(!got_time);
- /*
+ /*
* now shift time to dce_time, epoch 00:00:00:00, 15 October 1582
* dce time ends year ~3400, so start to worry now
*/
@@ -207,7 +207,7 @@ uuid_create(afsUUID *uuid)
dce_time = tv.tv_usec * MULTIPLIER_100_NANO_SEC + counter;
dce_time += ((uint64_t)tv.tv_sec) * 10000000;
dce_time += (((uint64_t)0x01b21dd2) << 32) + 0x13814000;
-
+
uuid->time_low = dce_time & 0xffffffff;
uuid->time_mid = 0xffff & (dce_time >> 32);
uuid->time_hi_and_version = 0x0fff & (dce_time >> 48);
@@ -267,7 +267,7 @@ uuid_from_string(const char *str, afsUUID *uuid)
&node[0], &node[1], &node[2], &node[3], &node[4], &node[5]);
if (i != 11)
return -1;
-
+
uuid->time_low = time_low;
uuid->time_mid = time_mid;
uuid->time_hi_and_version = time_hi_and_version;