Indentation and whitespace fixes.
There were many combinations of tab-width used so making the indentation look right in the editor wasn't really possible. The changes made: - All tabs replaced with spaces. - Indentation depth 4. - , followed by space. - Most binary operators (*, =, -) surrounded by one space. - No space following ( or before ). - Keywords follwed by 1 space.
This commit is contained in:
@ -1332,7 +1332,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
if (pipe(daemon_pipe) == -1)
|
||||
{
|
||||
fprintf(stderr,"Error: Failed to create pipe for inter-process communication: %d %s",errno,strerror(errno));
|
||||
fprintf(stderr, "Error: Failed to create pipe for inter-process communication: %d %s",
|
||||
errno, strerror(errno));
|
||||
rc = MAXSCALE_INTERNALERROR;
|
||||
goto return_main;
|
||||
}
|
||||
@ -2228,7 +2229,9 @@ bool pid_file_exists()
|
||||
/** no such process, old PID file */
|
||||
if (lock_failed)
|
||||
{
|
||||
char* logerr = "Locking the PID file '%s' failed. Read PID from file and no process found with PID %d. "
|
||||
char* logerr =
|
||||
"Locking the PID file '%s' failed. "
|
||||
"Read PID from file and no process found with PID %d. "
|
||||
"Confirm that no other process holds the lock on the PID file.";
|
||||
snprintf(logbuf, sizeof(logbuf), logerr, pathbuf, pid);
|
||||
print_log_n_stderr(true, true, logbuf, logbuf, 0);
|
||||
@ -2246,8 +2249,10 @@ bool pid_file_exists()
|
||||
}
|
||||
else
|
||||
{
|
||||
char* logerr = "MaxScale is already running. Process id: %d. "
|
||||
"Use another location for the PID file to run multiple instances of MaxScale on the same machine.";
|
||||
char* logerr =
|
||||
"MaxScale is already running. Process id: %d. "
|
||||
"Use another location for the PID file to run multiple "
|
||||
"instances of MaxScale on the same machine.";
|
||||
snprintf(logbuf, sizeof(logbuf), logerr, pid);
|
||||
print_log_n_stderr(true, true, logbuf, logbuf, 0);
|
||||
unlock_pidfile();
|
||||
@ -2293,8 +2298,10 @@ static int write_pid_file() {
|
||||
{
|
||||
if (errno == EWOULDBLOCK)
|
||||
{
|
||||
snprintf(logbuf,sizeof(logbuf),"Failed to lock PID file '%s', another process is holding a lock on it. "
|
||||
"Please confirm that no other MaxScale process is using the same PID file location.",pidfile);
|
||||
snprintf(logbuf, sizeof(logbuf),
|
||||
"Failed to lock PID file '%s', another process is holding a lock on it. "
|
||||
"Please confirm that no other MaxScale process is using the same "
|
||||
"PID file location.", pidfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user