* amd/nfs_subr.c (fh_to_mp3): Fix memset bug. In this case
authorDaniel Ottavio <ottavio@fsl.cs.sunysb.edu>
Wed, 30 Mar 2005 04:57:39 +0000 (04:57 +0000)
committerDaniel Ottavio <ottavio@fsl.cs.sunysb.edu>
Wed, 30 Mar 2005 04:57:39 +0000 (04:57 +0000)
the memset can be removed because strncpy() should padd the
buffer with NULLs anyway.

ChangeLog
amd/nfs_subr.c

index 0f123ddc5765fcd0118ea9f5c404a3d732b8057f..1c7dafeb43e932c5cc4362687f08597c48c6fb95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-29  Daniel P. Ottavio  <dottavio@ic.sunysb.edu>
+
+       * amd/nfs_subr.c (fh_to_mp3): Fix memset bug. In this case
+       the memset can be removed because strncpy() should padd the 
+       buffer with NULLs anyway.
+
 2005-03-21  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
 
        * include/am_defs.h: Clarify comment.
index 6928853311f0ceb63c289c0ed879ba32a07754a3..b73c265dd1a38085a3192e40944e2b1ec484d565 100644 (file)
@@ -37,7 +37,7 @@
  * SUCH DAMAGE.
  *
  *
- * $Id: nfs_subr.c,v 1.23 2005/02/17 21:32:05 ezk Exp $
+ * $Id: nfs_subr.c,v 1.24 2005/03/30 04:57:39 ottavio Exp $
  *
  */
 
@@ -615,7 +615,6 @@ fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop)
   if (fp->fhh_type != 0) {
     /* New filehandle type */
     char *path = xmalloc(sizeof(*fhp) + 1);
-    memset(path, 0, sizeof(fhp) + 1);
     strncpy(path, (char *) fhp, sizeof(*fhp));
     /* dlog("fh_to_mp3: new filehandle: %s", path); */