=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/Attic/proto.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/cvs/Attic/proto.c 2004/12/02 19:23:44 1.29 --- src/usr.bin/cvs/Attic/proto.c 2004/12/06 21:03:12 1.30 *************** *** 1,4 **** ! /* $OpenBSD: proto.c,v 1.29 2004/12/02 19:23:44 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: proto.c,v 1.30 2004/12/06 21:03:12 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 227,234 **** if (cvs_subproc_pid == -1) { cvs_log(LP_ERRNO, "failed to fork for cvs server connection"); return (-1); ! } ! else if (cvs_subproc_pid == 0) { if ((dup2(infd[0], STDIN_FILENO) == -1) || (dup2(outfd[1], STDOUT_FILENO) == -1)) { cvs_log(LP_ERRNO, --- 227,233 ---- if (cvs_subproc_pid == -1) { cvs_log(LP_ERRNO, "failed to fork for cvs server connection"); return (-1); ! } else if (cvs_subproc_pid == 0) { if ((dup2(infd[0], STDIN_FILENO) == -1) || (dup2(outfd[1], STDOUT_FILENO) == -1)) { cvs_log(LP_ERRNO, *************** *** 735,742 **** if ((len = strlen(cvs_proto_buf)) != 0) { if (cvs_proto_buf[len - 1] != '\n') { /* truncated line */ ! } ! else cvs_proto_buf[--len] = '\0'; } --- 734,740 ---- if ((len = strlen(cvs_proto_buf)) != 0) { if (cvs_proto_buf[len - 1] != '\n') { /* truncated line */ ! } else cvs_proto_buf[--len] = '\0'; } *************** *** 812,819 **** ret = fputs(resp->resp_str, stdout); if (ret == EOF) { cvs_log(LP_ERRNO, "failed to send response to client"); ! } ! else { if (arg != NULL) { putc(' ', stdout); fputs(arg, stdout); --- 810,816 ---- ret = fputs(resp->resp_str, stdout); if (ret == EOF) { cvs_log(LP_ERRNO, "failed to send response to client"); ! } else { if (arg != NULL) { putc(' ', stdout); fputs(arg, stdout); *************** *** 852,859 **** if ((len = strlen(cvs_proto_buf)) != 0) { if (cvs_proto_buf[len - 1] != '\n') { /* truncated line */ ! } ! else cvs_proto_buf[--len] = '\0'; } --- 849,855 ---- if ((len = strlen(cvs_proto_buf)) != 0) { if (cvs_proto_buf[len - 1] != '\n') { /* truncated line */ ! } else cvs_proto_buf[--len] = '\0'; }