Skip to content

Commit

Permalink
Remove unnecessary spaces and tabs at end of line.
Browse files Browse the repository at this point in the history
Patch conributed by Jun Kuriyama.
  • Loading branch information
t-ishii committed Aug 22, 2009
1 parent 457cbff commit 4ff74eb
Show file tree
Hide file tree
Showing 27 changed files with 597 additions and 597 deletions.
24 changes: 12 additions & 12 deletions child.c
@@ -1,8 +1,8 @@
/* -*-pgsql-c-*- */
/*
* $Header: /cvsroot/pgpool/pgpool-II/child.c,v 1.32 2009/08/18 08:32:13 t-ishii Exp $
* $Header: /cvsroot/pgpool/pgpool-II/child.c,v 1.33 2009/08/22 04:04:21 t-ishii Exp $
*
* pgpool: a language independent connection pool server for PostgreSQL
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
* Copyright (c) 2003-2009 PgPool Global Development Group
Expand Down Expand Up @@ -468,7 +468,7 @@ void do_child(int unix_fd, int inet_fd)
pool_connection_pool_timer(backend);
}
break;

/* error occured. discard backend connection pool
and disconnect connection to the frontend */
case POOL_ERROR:
Expand Down Expand Up @@ -651,7 +651,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time
tmback.tv_usec += 1000000;
timeout->tv_sec = tmback.tv_sec;
timeout->tv_usec = tmback.tv_usec;
}
}
}
#ifdef DEBUG
pool_log("g:after select = {%d, %d}", tv2.tv_sec, tv2.tv_usec);
Expand Down Expand Up @@ -707,7 +707,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time
}

afd = accept(fd, (struct sockaddr *)&saddr.addr, &saddr.salen);

save_errno = errno;
/* check backend timer is expired */
if (backend_timer_expired)
Expand Down Expand Up @@ -893,7 +893,7 @@ static POOL_CONNECTION *do_accept(int unix_fd, int inet_fd, struct timeval *time
memcpy(&cp->raddr, &saddr, sizeof(SockAddr));
if (cp->raddr.addr.ss_family == 0)
cp->raddr.addr.ss_family = AF_UNIX;

return cp;
}

Expand Down Expand Up @@ -1059,7 +1059,7 @@ static StartupPacket *read_startup_packet(POOL_CONNECTION *cp)
return NULL;
}

pool_debug("Protocol Major: %d Minor: %d database: %s user: %s",
pool_debug("Protocol Major: %d Minor: %d database: %s user: %s",
sp->major, sp->minor, sp->database, sp->user);
alarm(0);
pool_signal(SIGALRM, SIG_IGN);
Expand All @@ -1074,7 +1074,7 @@ int send_startup_packet(POOL_CONNECTION_POOL_SLOT *cp)
int len;

len = htonl(cp->sp->len + sizeof(len));
pool_write(cp->con, &len, sizeof(len));
pool_write(cp->con, &len, sizeof(len));
return pool_write_and_flush(cp->con, cp->sp->startup_packet, cp->sp->len);
}

Expand Down Expand Up @@ -1106,7 +1106,7 @@ void cancel_request(CancelPacket *sp)
}
if (i == pool_config->num_init_children*pool_config->max_pool)
return; /* invalid key */

for (i=0;i<NUM_BACKENDS;i++,c++)
{
if (!VALID_BACKEND(i))
Expand Down Expand Up @@ -1286,7 +1286,7 @@ static RETSIGTYPE close_idle_connection(int sig)

/*
* signal handler for SIGALRM
*
*
*/
static RETSIGTYPE authentication_timeout(int sig)
{
Expand Down Expand Up @@ -1596,7 +1596,7 @@ static int s_do_auth(POOL_CONNECTION_POOL_SLOT *cp, char *password)
int size;
char salt[3];
char *crypt_password;

status = pool_read(cp->con, &salt, 2);
if (status > 0)
{
Expand Down Expand Up @@ -1788,7 +1788,7 @@ void connection_count_down(void)
pool_semaphore_unlock(CONN_COUNTER_SEM);
}

/*
/*
* handle SIGUSR2
* Wakeup all process
*/
Expand Down
32 changes: 16 additions & 16 deletions main.c
@@ -1,8 +1,8 @@
/* -*-pgsql-c-*- */
/*
* $Header: /cvsroot/pgpool/pgpool-II/main.c,v 1.50 2009/08/13 13:39:19 t-ishii Exp $
* $Header: /cvsroot/pgpool/pgpool-II/main.c,v 1.51 2009/08/22 04:04:21 t-ishii Exp $
*
* pgpool: a language independent connection pool server for PostgreSQL
* pgpool: a language independent connection pool server for PostgreSQL
* written by Tatsuo Ishii
*
* Copyright (c) 2003-2009 PgPool Global Development Group
Expand Down Expand Up @@ -121,7 +121,7 @@ ProcessInfo *pids; /* shmem child pid table */
* this is a two dimension array. i.e.:
* con_info[pool_config->num_init_children][pool_config->max_pool]
*/
ConnectionInfo *con_info;
ConnectionInfo *con_info;

static int unix_fd; /* unix domain socket fd */
static int inet_fd; /* inet domain socket fd */
Expand Down Expand Up @@ -247,7 +247,7 @@ int main(int argc, char **argv)
exit(1);
}
break;

case 'n': /* no detaching control ttys */
not_detach = 1;
break;
Expand Down Expand Up @@ -779,7 +779,7 @@ static void write_pid_file(void)
pid_t pcp_fork_a_child(int unix_fd, int inet_fd, char *pcp_conf_file)
{
pid_t pid;

pid = fork();

if (pid == 0)
Expand Down Expand Up @@ -962,7 +962,7 @@ static void myunlink(const char* path)
static void myexit(int code)
{
int i;

if (getpid() != mypid)
return;

Expand All @@ -983,7 +983,7 @@ static void myexit(int code)
pool_error("wait() failed. reason:%s", strerror(errno));
POOL_SETMASK(&UnBlockSig);
}

myunlink(un_addr.sun_path);
myunlink(pcp_un_addr.sun_path);
myunlink(pool_config->pid_file_name);
Expand Down Expand Up @@ -1195,7 +1195,7 @@ static void failover(void)
return;
}

/*
/*
* if not in replication mode/master slave mode, we treat this a restart request.
* otherwise we need to check if we have already failovered.
*/
Expand Down Expand Up @@ -1518,7 +1518,7 @@ system_db_health_check(void)
/* if SystemDB is already down, ignore */
if (SYSDB_STATUS == CON_UNUSED || SYSDB_STATUS == CON_DOWN)
return 0;

if (*SYSDB_INFO->hostname == '\0')
fd = connect_unix_domain_socket_by_port(SYSDB_INFO->port, pool_config->backend_socket_dir);
else
Expand Down Expand Up @@ -1613,7 +1613,7 @@ static void reaper(void)
break;
} else {
pool_debug("child %d exits with status %d by signal %d", pid, status, WTERMSIG(status));

/* look for exiting child's pid */
for (i=0;i<pool_config->num_init_children;i++)
{
Expand Down Expand Up @@ -1695,12 +1695,12 @@ pool_get_system_db_info(void)
{
if (system_db_info == NULL)
return NULL;

return system_db_info->info;
}


/*
/*
* handle SIGUSR2
* Wakeup all processes
*/
Expand All @@ -1712,10 +1712,10 @@ static void wakeup_children(void)

static RETSIGTYPE wakeup_handler(int sig)
{
POOL_SETMASK(&BlockSig);
POOL_SETMASK(&BlockSig);
wakeup_request = 1;
write(pipe_fds[1], "\0", 1);
POOL_SETMASK(&UnBlockSig);
POOL_SETMASK(&UnBlockSig);
}

/*
Expand Down Expand Up @@ -1815,7 +1815,7 @@ static void pool_sleep(unsigned int second)

r = pool_pause(&timeout);
POOL_SETMASK(&BlockSig);
if (r > 0)
if (r > 0)
CHECK_REQUEST;
POOL_SETMASK(&UnBlockSig);
gettimeofday(&current_time, NULL);
Expand Down Expand Up @@ -1870,7 +1870,7 @@ static int trigger_failover_command(int node, const char *command_line)
return -1;
}
exec_cmd = init_string("");

while (*command_line)
{
if (*command_line == '%')
Expand Down
4 changes: 2 additions & 2 deletions md5.c
Expand Up @@ -17,7 +17,7 @@
* Taiki Yamaguchi <yamaguchi@sraoss.co.jp>
*
* IDENTIFICATION
* $Header: /cvsroot/pgpool/pgpool-II/md5.c,v 1.1 2006/09/08 03:36:04 t-ishii Exp $
* $Header: /cvsroot/pgpool/pgpool-II/md5.c,v 1.2 2009/08/22 04:04:21 t-ishii Exp $
*/

#include <stdio.h>
Expand Down Expand Up @@ -206,7 +206,7 @@ doTheRounds(uint32 X[16], uint32 state[4])
GG(d, a, b, c, X[ 2], S22, T[29]);
GG(c, d, a, b, X[ 7], S23, T[30]);
GG(b, c, d, a, X[12], S24, T[31]);

HH(a, b, c, d, X[ 5], S31, T[32]);
HH(d, a, b, c, X[ 8], S32, T[33]);
HH(c, d, a, b, X[11], S33, T[34]);
Expand Down
4 changes: 2 additions & 2 deletions pcp/md5.c
Expand Up @@ -17,7 +17,7 @@
* Taiki Yamaguchi <yamaguchi@sraoss.co.jp>
*
* IDENTIFICATION
* $Header: /cvsroot/pgpool/pgpool-II/pcp/md5.c,v 1.1 2006/09/08 03:36:49 t-ishii Exp $
* $Header: /cvsroot/pgpool/pgpool-II/pcp/md5.c,v 1.2 2009/08/22 04:04:21 t-ishii Exp $
*/

#include <stdio.h>
Expand Down Expand Up @@ -206,7 +206,7 @@ doTheRounds(uint32 X[16], uint32 state[4])
GG(d, a, b, c, X[ 2], S22, T[29]);
GG(c, d, a, b, X[ 7], S23, T[30]);
GG(b, c, d, a, X[12], S24, T[31]);

HH(a, b, c, d, X[ 5], S31, T[32]);
HH(d, a, b, c, X[ 8], S32, T[33]);
HH(c, d, a, b, X[11], S33, T[34]);
Expand Down

0 comments on commit 4ff74eb

Please sign in to comment.