]> diplodocus.org Git - nmh/blobdiff - sbr/fmt_new.c
dtimezone(): Explain abs(3) is undefined on INT_MIN.
[nmh] / sbr / fmt_new.c
index 078831a589e2ec4a7ccc281f2db3b94f17a66251..c699dbd9c2e4d8b4a8bdf17bd135968d8490190c 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * fmt_new.c -- read format file/string and normalize
+/* fmt_new.c -- read format file/string and normalize
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -30,8 +28,7 @@ new_fs (char *form, char *format, char *default_fs)
     struct stat st;
     FILE *fp;
 
     struct stat st;
     FILE *fp;
 
-    if (formats)
-       free (formats);
+    mh_xfree(formats);
 
     if (form) {
        if ((fp = fopen (etcpath (form), "r")) == NULL)
 
     if (form) {
        if ((fp = fopen (etcpath (form), "r")) == NULL)
@@ -59,7 +56,7 @@ new_fs (char *form, char *format, char *default_fs)
 
 
 void
 
 
 void
-free_fs (){
+free_fs(void) {
     free (formats);
     formats = 0;
 }
     free (formats);
     formats = 0;
 }
@@ -103,7 +100,8 @@ normalize (char *cp)
                    break;
 
                case 0: 
                    break;
 
                case 0: 
-                   cp--;       /* fall */
+                   cp--;
+                   /* FALLTHRU */
                default: 
                    *dp++ = *cp;
                    break;
                default: 
                    *dp++ = *cp;
                    break;