Hi tech,

The following patch eliminates one goto in rcs(1).
The goto was used for skipping over rcs_set_description().
This can be handed in the "if" which already encloses rcs_set_description().

- Michael


Index: ci.c
===================================================================
RCS file: /cvs/src/usr.bin/rcs/ci.c,v
retrieving revision 1.220
diff -u -r1.220 ci.c
--- ci.c        13 Jun 2015 20:15:21 -0000      1.220
+++ ci.c        15 Jun 2015 01:20:46 -0000
@@ -620,17 +620,13 @@
                checkin_keywordscan(bp, &pb->newrev,
                    &pb->date, &pb->state, &pb->author);
 
-       if (pb->flags & CI_SKIPDESC)
-               goto skipdesc;
-
        /* Get description from user */
-       if (pb->description == NULL &&
+       if (!(pb->flags & CI_SKIPDESC) &&
+           pb->description == NULL &&
            rcs_set_description(pb->file, NULL) == -1) {
                warn("%s", pb->filename);
                return (-1);
        }
-
-skipdesc:
 
        /*
         * If the user had specified a zero-ending revision number e.g. 4.0

Reply via email to