diff options
author | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-27 15:39:23 +0000 |
---|---|---|
committer | Jean-Francois Brousseau <jfb@cvs.openbsd.org> | 2004-08-27 15:39:23 +0000 |
commit | 4ee4e59f373b43d3e89d67bdf4e4810f034177d9 (patch) | |
tree | 81ebb10e74958420523a775313ab6acdbd88f21e /usr.bin/cvs | |
parent | e91d817909461c76aad79c1b5df3d76ff8a52422 (diff) |
When the remote version string points to NULL, print "(unknown)" like
GNU CVS does
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r-- | usr.bin/cvs/version.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cvs/version.c b/usr.bin/cvs/version.c index ce019a3df2d..24a07f53f94 100644 --- a/usr.bin/cvs/version.c +++ b/usr.bin/cvs/version.c @@ -1,4 +1,4 @@ -/* $OpenBSD: version.c,v 1.5 2004/08/02 22:45:57 jfb Exp $ */ +/* $OpenBSD: version.c,v 1.6 2004/08/27 15:39:22 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -55,8 +55,8 @@ cvs_version(int argc, char **argv) if (cvs_connect(root) < 0) return (1); - cvs_sendreq(root, CVS_REQ_VERSION, NULL); - printf("Server: %s\n", root->cr_version); + printf("Server: %s\n", root->cr_version == NULL ? + "(unknown)" : root->cr_version); cvs_disconnect(root); } |