=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/util.c,v retrieving revision 1.153 retrieving revision 1.154 diff -c -r1.153 -r1.154 *** src/usr.bin/cvs/util.c 2010/09/23 18:10:16 1.153 --- src/usr.bin/cvs/util.c 2010/11/11 21:00:59 1.154 *************** *** 1,4 **** ! /* $OpenBSD: util.c,v 1.153 2010/09/23 18:10:16 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink --- 1,4 ---- ! /* $OpenBSD: util.c,v 1.154 2010/11/11 21:00:59 nicm Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * Copyright (c) 2005, 2006 Joris Vink *************** *** 197,225 **** if (strlcat(buf, tmp, len) >= len) fatal("cvs_modetostr: string truncation"); } - } - - /* - * cvs_cksum() - * - * Calculate the MD5 checksum of the file whose path is and generate - * a CVS-format 32 hex-digit string, which is stored in , whose size is - * given in and must be at least 33. - * Returns 0 on success, or -1 on failure. - */ - int - cvs_cksum(const char *file, char *dst, size_t len) - { - if (len < CVS_CKSUM_LEN) { - cvs_log(LP_ERR, "buffer too small for checksum"); - return (-1); - } - if (MD5File(file, dst) == NULL) { - cvs_log(LP_ERR, "failed to generate checksum for %s", file); - return (-1); - } - - return (0); } /* --- 197,202 ----