Relayouted all switch statements: case aligns with switch.
[mmh] / uip / annosbr.c
index 034aa12..e8c03e1 100644 (file)
@@ -39,12 +39,12 @@ annotate(char *file, char *comp, char *text, int inplace, int datesw,
        /* open and lock the file to be annotated */
        if ((fd = lkopen(file, O_RDWR, 0)) == NOTOK) {
                switch (errno) {
-                       case ENOENT:
-                               break;
+               case ENOENT:
+                       break;
 
-                       default:
-                               admonish(file, "unable to lock and open");
-                               break;
+               default:
+                       admonish(file, "unable to lock and open");
+                       break;
                }
                return 1;
        }
@@ -135,7 +135,7 @@ annolist(char *file, char *comp, char *text, int number)
                        if (number)
                                printf("%d\t", ++count);
 
-                       if (text == (char *)0 && (sp = strrchr(cp, '/')) != (char *)0)
+                       if (text == NULL && (sp = strrchr(cp, '/')) != NULL)
                                cp = sp + 1;
 
                        printf("%s\n", cp);
@@ -297,7 +297,7 @@ annosbr(int fd, char *file, char *comp, char *text, int inplace,
 
                        if (strncasecmp(field, comp, length) == 0 && field[length] == ':') {
                                if (delete == 0) {
-                                       if (text == (char *)0)
+                                       if (text == NULL)
                                                break;
 
                                        for (cp = field + length + 1; *cp == ' ' || *cp == '\t'; cp++)
@@ -308,7 +308,7 @@ annosbr(int fd, char *file, char *comp, char *text, int inplace,
                                                                break;
                                        }
                                        else {
-                                               if ((sp = strrchr(cp, '/')) != (char *)0)
+                                               if ((sp = strrchr(cp, '/')) != NULL)
                                                        cp = sp + 1;
 
                                                if (strcmp(cp, text) == 0)
@@ -428,13 +428,14 @@ annosbr(int fd, char *file, char *comp, char *text, int inplace,
                strncpy(buffer, m_backup(file), sizeof(buffer));
                if (rename(file, buffer) == NOTOK) {
                        switch (errno) {
-                               case ENOENT:  /* unlinked early - no annotations */
-                                       unlink(tmpfil);
-                                       break;
+                       case ENOENT:  /* unlinked early - no annotations */
+                               unlink(tmpfil);
+                               break;
 
-                               default:
-                                       admonish(buffer, "unable to rename %s to", file);
-                                       break;
+                       default:
+                               admonish(buffer, "unable to rename %s to",
+                                               file);
+                               break;
                        }
                        return 1;
                }