diff options
author | Joris Vink <joris@cvs.openbsd.org> | 2005-03-13 19:52:27 +0000 |
---|---|---|
committer | Joris Vink <joris@cvs.openbsd.org> | 2005-03-13 19:52:27 +0000 |
commit | 501ddec31037159e816e42d52b020edf47185847 (patch) | |
tree | a15284f94f6a1b3f7db55b8df9c6fc47e76e05e4 /usr.bin | |
parent | 6f620dcce54e65952c33ef6d0fbe95d4742dc005 (diff) |
simplify if {} else {} case.
ok xsa@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/cvs/proto.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/cvs/proto.c b/usr.bin/cvs/proto.c index 9bcbf581505..5f5bd4abe7a 100644 --- a/usr.bin/cvs/proto.c +++ b/usr.bin/cvs/proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proto.c,v 1.41 2005/03/04 18:36:57 joris Exp $ */ +/* $OpenBSD: proto.c,v 1.42 2005/03/13 19:52:26 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -735,9 +735,8 @@ cvs_getresp(struct cvsroot *root) fputs(cvs_proto_buf, cvs_server_outlog); if ((len = strlen(cvs_proto_buf)) != 0) { - if (cvs_proto_buf[len - 1] != '\n') { - /* truncated line */ - } else + /* if len - 1 != '\n' the line is truncated */ + if (cvs_proto_buf[len - 1] == '\n') { cvs_proto_buf[--len] = '\0'; } |