=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/rcsutil.c,v retrieving revision 1.21 retrieving revision 1.22 diff -c -r1.21 -r1.22 *** src/usr.bin/rcs/rcsutil.c 2006/09/25 23:58:05 1.21 --- src/usr.bin/rcs/rcsutil.c 2006/10/12 17:20:12 1.22 *************** *** 1,4 **** ! /* $OpenBSD: rcsutil.c,v 1.21 2006/09/25 23:58:05 ray Exp $ */ /* * Copyright (c) 2005, 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria --- 1,4 ---- ! /* $OpenBSD: rcsutil.c,v 1.22 2006/10/12 17:20:12 niallo Exp $ */ /* * Copyright (c) 2005, 2006 Joris Vink * Copyright (c) 2006 Xavier Santolaria *************** *** 196,204 **** * This ensures that there is at least one suffix for strsep(). */ if (strcmp(rcs_suffixes, "") == 0) { - fd = open(rcspath, O_RDONLY); if (strlcpy(out, rcspath, len) >= len) errx(1, "rcs_choosefile: truncation"); return (fd); } --- 196,204 ---- * This ensures that there is at least one suffix for strsep(). */ if (strcmp(rcs_suffixes, "") == 0) { if (strlcpy(out, rcspath, len) >= len) errx(1, "rcs_choosefile: truncation"); + fd = open(rcspath, O_RDONLY); return (fd); } *************** *** 259,267 **** xfree(suffixes); - fd = open(rcspath, O_RDONLY); if (strlcpy(out, rcspath, len) >= len) errx(1, "rcs_choosefile: truncation"); return (fd); } --- 259,268 ---- xfree(suffixes); if (strlcpy(out, rcspath, len) >= len) errx(1, "rcs_choosefile: truncation"); + + fd = open(rcspath, O_RDONLY); return (fd); }