This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

M_ZERO for bsd_tcpip cyg_net_malloc


Hi Folks

I just committed the following to the beta 2.0 release branch. The
same will be applied to the trunk in the next few days are part of a
bigger patch for IPv6 support.

     Andrew

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.17.2.1
diff -u -r1.17.2.1 ChangeLog
--- ChangeLog   14 Mar 2003 13:44:37 -0000      1.17.2.1
+++ ChangeLog   29 Apr 2003 13:35:24 -0000
@@ -1,3 +1,8 @@
+2003-04-29  Andrew Lunn  <andrew dot lunn at ascom dot ch>
+
+       * src/ecos/support.c (cyg_net_malloc): Honour the M_ZERO
+       flag. Otherwise we get random junk in places we don't want it.
+
 2003-03-14  Andrew Lunn  <andrew dot lunn at ascom dot ch>
 
        * src/sys/net/if.c (if_attach): Removed printf which causes the
Index: src/ecos/support.c
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/ecos/support.c,v
retrieving revision 1.4
diff -u -r1.4 support.c
--- src/ecos/support.c  3 Dec 2002 17:22:46 -0000       1.4
+++ src/ecos/support.c  29 Apr 2003 13:35:24 -0000
@@ -201,6 +201,9 @@
     } else {
         res = cyg_mempool_var_alloc(net_mem, size);
     }
+    if ((flags & M_ZERO) && res) {
+      memset(res,0,size);
+    }
     FINISH_STATS(stats_malloc);
     log(LOG_MDEBUG, "%p\n", res);
     return (res);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]