diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2008-02-09 14:25:03 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2008-02-09 14:25:03 +0000 |
commit | f237084d79c3d8b4af9202b5fb9e31ce843c13c8 (patch) | |
tree | a72ca2d4cd6d169de23c482e4dcbe57817b98f76 /usr.bin/cvs/getlog.c | |
parent | c7228a1903a177a51210df19d874e0e1b2de6a21 (diff) |
make sure we do not call rcsnum_addmagic() directly on
a revision number in our symbol list if we want to correctly
reuse that symbol later on in rcs_translate_tag();
Diffstat (limited to 'usr.bin/cvs/getlog.c')
-rw-r--r-- | usr.bin/cvs/getlog.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/cvs/getlog.c b/usr.bin/cvs/getlog.c index 4ed1f3d9ee7..f65a107e2d6 100644 --- a/usr.bin/cvs/getlog.c +++ b/usr.bin/cvs/getlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getlog.c,v 1.85 2008/02/09 14:03:20 joris Exp $ */ +/* $OpenBSD: getlog.c,v 1.86 2008/02/09 14:25:02 joris Exp $ */ /* * Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org> * Copyright (c) 2006 Joris Vink <joris@openbsd.org> @@ -182,6 +182,7 @@ void cvs_log_local(struct cvs_file *cf) { u_int nrev; + RCSNUM *rev; struct rcs_sym *sym; struct rcs_lock *lkp; struct rcs_delta *rdp; @@ -244,11 +245,14 @@ cvs_log_local(struct cvs_file *cf) if (!(runflags & L_NOTAGS)) { cvs_printf("symbolic names:\n"); TAILQ_FOREACH(sym, &(cf->file_rcs->rf_symbols), rs_list) { + rev = rcsnum_alloc(); + rcsnum_cpy(sym->rs_num, rev, 0); if (RCSNUM_ISBRANCH(sym->rs_num)) - rcsnum_addmagic(sym->rs_num); + rcsnum_addmagic(rev); cvs_printf("\t%s: %s\n", sym->rs_name, - rcsnum_tostr(sym->rs_num, numb, sizeof(numb))); + rcsnum_tostr(rev, numb, sizeof(numb))); + rcsnum_free(rev); } } |