=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/root.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/cvs/root.c 2004/08/31 11:54:35 1.11 --- src/usr.bin/cvs/root.c 2004/12/06 21:03:13 1.12 *************** *** 1,4 **** ! /* $OpenBSD: root.c,v 1.11 2004/08/31 11:54:35 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: root.c,v 1.12 2004/12/06 21:03:13 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. *************** *** 183,190 **** } root->cr_user = cp; ! } ! else sp = cp; pp = strchr(sp, ':'); --- 183,189 ---- } root->cr_user = cp; ! } else sp = cp; pp = strchr(sp, ':'); *************** *** 215,222 **** if (tmp == NULL) { /* just forget about the cache and return anyways */ root->cr_ref--; ! } ! else { cvs_rcache = (struct cvsroot **)tmp; cvs_rcache[cvs_rcsz++] = root; } --- 214,220 ---- if (tmp == NULL) { /* just forget about the cache and return anyways */ root->cr_ref--; ! } else { cvs_rcache = (struct cvsroot **)tmp; cvs_rcache[cvs_rcsz++] = root; } *************** *** 278,285 **** return cvsroot_parse(rootstr); else return (NULL); ! } ! else { cvs_log(LP_ERRNO, "failed to open CVS/Root"); return (NULL); } --- 276,282 ---- return cvsroot_parse(rootstr); else return (NULL); ! } else { cvs_log(LP_ERRNO, "failed to open CVS/Root"); return (NULL); } *************** *** 295,302 **** len = strlen(line); if (len == 0) { cvs_log(LP_WARN, "empty CVS/Root file"); ! } ! else if (line[len - 1] == '\n') line[--len] = '\0'; return cvsroot_parse(line); --- 292,298 ---- len = strlen(line); if (len == 0) { cvs_log(LP_WARN, "empty CVS/Root file"); ! } else if (line[len - 1] == '\n') line[--len] = '\0'; return cvsroot_parse(line);