Unverified Commit 9d31768c authored by Madelyn Olson's avatar Madelyn Olson Committed by GitHub
Browse files

Fix a couple of tabs that caused misindentation (#12541)

Fixed some usages of tabs which caused weird indentation in the code. Tried to find all of the places so their was one PR. I ignored all of the usages of tabs which don't really affect readability.
parent 4ba9e18e
...@@ -2580,7 +2580,7 @@ uint32_t writePingExt(clusterMsg *hdr, int gossipcount) { ...@@ -2580,7 +2580,7 @@ uint32_t writePingExt(clusterMsg *hdr, int gossipcount) {
clusterMsgPingExtHumanNodename *ext = preparePingExt(cursor, CLUSTERMSG_EXT_TYPE_HUMAN_NODENAME, getHumanNodenamePingExtSize()); clusterMsgPingExtHumanNodename *ext = preparePingExt(cursor, CLUSTERMSG_EXT_TYPE_HUMAN_NODENAME, getHumanNodenamePingExtSize());
memcpy(ext->human_nodename, myself->human_nodename, sdslen(myself->human_nodename)); memcpy(ext->human_nodename, myself->human_nodename, sdslen(myself->human_nodename));
/* Move the write cursor */ /* Move the write cursor */
cursor = nextPingExt(cursor); cursor = nextPingExt(cursor);
} }
...@@ -2646,7 +2646,7 @@ void clusterProcessPingExtensions(clusterMsg *hdr, clusterLink *link) { ...@@ -2646,7 +2646,7 @@ void clusterProcessPingExtensions(clusterMsg *hdr, clusterLink *link) {
if (type == CLUSTERMSG_EXT_TYPE_HOSTNAME) { if (type == CLUSTERMSG_EXT_TYPE_HOSTNAME) {
clusterMsgPingExtHostname *hostname_ext = (clusterMsgPingExtHostname *) &(ext->ext[0].hostname); clusterMsgPingExtHostname *hostname_ext = (clusterMsgPingExtHostname *) &(ext->ext[0].hostname);
ext_hostname = hostname_ext->hostname; ext_hostname = hostname_ext->hostname;
} else if (type == CLUSTERMSG_EXT_TYPE_HUMAN_NODENAME) { } else if (type == CLUSTERMSG_EXT_TYPE_HUMAN_NODENAME) {
clusterMsgPingExtHumanNodename *humannodename_ext = (clusterMsgPingExtHumanNodename *) &(ext->ext[0].human_nodename); clusterMsgPingExtHumanNodename *humannodename_ext = (clusterMsgPingExtHumanNodename *) &(ext->ext[0].human_nodename);
ext_humannodename = humannodename_ext->human_nodename; ext_humannodename = humannodename_ext->human_nodename;
} else if (type == CLUSTERMSG_EXT_TYPE_FORGOTTEN_NODE) { } else if (type == CLUSTERMSG_EXT_TYPE_FORGOTTEN_NODE) {
...@@ -4247,7 +4247,7 @@ void clusterHandleSlaveFailover(void) { ...@@ -4247,7 +4247,7 @@ void clusterHandleSlaveFailover(void) {
if (server.cluster->mf_end) { if (server.cluster->mf_end) {
server.cluster->failover_auth_time = mstime(); server.cluster->failover_auth_time = mstime();
server.cluster->failover_auth_rank = 0; server.cluster->failover_auth_rank = 0;
clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER); clusterDoBeforeSleep(CLUSTER_TODO_HANDLE_FAILOVER);
} }
serverLog(LL_NOTICE, serverLog(LL_NOTICE,
"Start of election delayed for %lld milliseconds " "Start of election delayed for %lld milliseconds "
...@@ -4783,7 +4783,7 @@ void clusterCron(void) { ...@@ -4783,7 +4783,7 @@ void clusterCron(void) {
* a migration if there is no master with at least *two* working * a migration if there is no master with at least *two* working
* slaves. */ * slaves. */
if (orphaned_masters && max_slaves >= 2 && this_slaves == max_slaves && if (orphaned_masters && max_slaves >= 2 && this_slaves == max_slaves &&
server.cluster_allow_replica_migration) server.cluster_allow_replica_migration)
clusterHandleSlaveMigration(max_slaves); clusterHandleSlaveMigration(max_slaves);
} }
......
...@@ -2387,7 +2387,7 @@ static int isValidShutdownOnSigFlags(int val, const char **err) { ...@@ -2387,7 +2387,7 @@ static int isValidShutdownOnSigFlags(int val, const char **err) {
static int isValidAnnouncedNodename(char *val,const char **err) { static int isValidAnnouncedNodename(char *val,const char **err) {
if (!(isValidAuxString(val,sdslen(val)))) { if (!(isValidAuxString(val,sdslen(val)))) {
*err = "Announced human node name contained invalid character"; *err = "Announced human node name contained invalid character";
return 0; return 0;
} }
return 1; return 1;
} }
......
...@@ -3278,8 +3278,8 @@ static int isSensitiveCommand(int argc, char **argv) { ...@@ -3278,8 +3278,8 @@ static int isSensitiveCommand(int argc, char **argv) {
!strcasecmp(argv[1],"set")) { !strcasecmp(argv[1],"set")) {
for (int j = 2; j < argc; j = j+2) { for (int j = 2; j < argc; j = j+2) {
if (!strcasecmp(argv[j],"masterauth") || if (!strcasecmp(argv[j],"masterauth") ||
!strcasecmp(argv[j],"masteruser") || !strcasecmp(argv[j],"masteruser") ||
!strcasecmp(argv[j],"requirepass")) { !strcasecmp(argv[j],"requirepass")) {
return 1; return 1;
} }
} }
......
...@@ -608,7 +608,7 @@ size_t zmalloc_get_rss(void) { ...@@ -608,7 +608,7 @@ size_t zmalloc_get_rss(void) {
if ((fd = open(filename,O_RDONLY)) == -1) return 0; if ((fd = open(filename,O_RDONLY)) == -1) return 0;
if (ioctl(fd, PIOCPSINFO, &info) == -1) { if (ioctl(fd, PIOCPSINFO, &info) == -1) {
close(fd); close(fd);
return 0; return 0;
} }
close(fd); close(fd);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment