On Mon, May 09, 2022 at 10:42:29AM -0600, Theo de Raadt wrote:
> Martin Vahlensieck <open...@academicsolutions.ch> wrote:
> 
> >     if (!qflag) {
> > -           fprintf(stderr, "Identity removed: %s %s (%s)\n", path,
> > -               sshkey_type(key), comment);
> > +           fprintf(stderr, "Identity removed: %s %s%s%s%s\n", path,
> > +               sshkey_type(key), comment ? " (" : "",
> > +               comment ? comment : "", comment ? ")" : "");
> 
> this is probably better as something like
> 
> > -           fprintf(stderr, "Identity removed: %s %s (%s)\n", path,
> > -               sshkey_type(key), comment ? comment : "no comment");
> 
> Which has a minor ambiguity, but probably harms noone.
> 

Index: ssh-add.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/ssh-add.c,v
retrieving revision 1.165
diff -u -p -r1.165 ssh-add.c
--- ssh-add.c   4 Feb 2022 02:49:17 -0000       1.165
+++ ssh-add.c   9 May 2022 18:36:54 -0000
@@ -118,7 +118,7 @@ delete_one(int agent_fd, const struct ss
        }
        if (!qflag) {
                fprintf(stderr, "Identity removed: %s %s (%s)\n", path,
-                   sshkey_type(key), comment);
+                   sshkey_type(key), comment ? comment : "no comment");
        }
        return 0;
 }
@@ -392,7 +392,7 @@ add_file(int agent_fd, const char *filen
                    certpath, filename);
                sshkey_free(cert);
                goto out;
-       } 
+       }
 
        /* Graft with private bits */
        if ((r = sshkey_to_certified(private)) != 0) {

Reply via email to