diff options
author | 2004-08-27 15:39:22 +0000 | |
---|---|---|
committer | 2004-08-27 15:39:22 +0000 | |
commit | bf0b2c90b54023c347c79b9988cfa9eef0ea3d75 (patch) | |
tree | 462b3fbbb577148e0bf95fc37a16dad24b234087 /usr.bin/cvs | |
parent | Skip directory entries which have a file number of 0 (diff) | |
download | wireguard-openbsd-bf0b2c90b54023c347c79b9988cfa9eef0ea3d75.tar.xz wireguard-openbsd-bf0b2c90b54023c347c79b9988cfa9eef0ea3d75.zip |
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); } |