]> git.pond.sub.org Git - empserver/commitdiff
Fix rev. 1.5's placement of braces. No functional changes.
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 21 Dec 2004 12:23:01 +0000 (12:23 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 21 Dec 2004 12:23:01 +0000 (12:23 +0000)
src/lib/commands/turn.c

index d731c5cd9ad10cf7bd696d2dc930734a8c98f807..b98edff5e78a2de39bfd353a917fb386929015d9 100644 (file)
@@ -59,8 +59,7 @@ turn(void)
        msgfilepath = downfil;
     } else if (strcmp(p, "on") == 0) {
        pr("Removing no-login message and re-enabling logins.\n");
-       if ((unlink(downfil) == -1) && (errno != ENOENT))
-       {
+       if ((unlink(downfil) == -1) && (errno != ENOENT)) {
            pr("Could not remove no-login file, logins still disabled.\n");
            logerror("Could not remove no-login file (%s).\n", downfil);
            return RET_SYS;
@@ -78,19 +77,15 @@ turn(void)
     time(&tgm.tel_date);
     tgm.tel_length = getele("The World", buf);
 
-    if (tgm.tel_length < 0)
-    {
+    if (tgm.tel_length < 0) {
        pr("Ignored\n");
        if (msgfilepath == downfil)
            pr("NOT disabling logins.\n");
        return RET_SYN;
-    } else if (tgm.tel_length == 0)
-    {
-       if (msgfilepath == motdfil)
-       {
+    } else if (tgm.tel_length == 0) {
+       if (msgfilepath == motdfil) {
            pr("Removing exsting motd.\n");
-           if ((unlink(msgfilepath) == -1) && (errno != ENOENT))
-           {
+           if ((unlink(msgfilepath) == -1) && (errno != ENOENT)) {
                pr("Could not remove motd.\n");
                logerror("Could not remove motd file (%s).\n", msgfilepath);
                return RET_SYS;
@@ -105,8 +100,7 @@ turn(void)
 #else
     fd = open(msgfilepath, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0660);
 #endif
-    if (fd == -1)
-    {
+    if (fd == -1) {
        pr("Something went wrong opening the message file.\n");
        logerror("Could not open message file (%s).\n", msgfilepath);
        return RET_SYS;
@@ -117,8 +111,7 @@ turn(void)
 
     if ((write(fd, &tgm, sizeof(tgm)) < (ssize_t)sizeof(tgm)) ||
        (write(fd, buf, tgm.tel_length) < tgm.tel_length) ||
-       (close(fd) == -1))
-    {
+       (close(fd) == -1)) {
        pr("Something went wrong writing the message file.\n");
        logerror("Could not properly write message file (%s).\n",
            msgfilepath);