[K42-discussion] patch for trivial bug in times() "syscall"

Dilma DaSilva dilma at watson.ibm.com
Tue Sep 13 00:58:00 EST 2005


Thanks, Andrew. Your patch has been applied. I'm now pushing the
updated tree to kcvs.

Andrew Baumann writes:
 > Hi,
 > 
 > it seems that on Linux it is possible to call times(NULL). This patch emulates 
 > that behaviour.
 > 
 > Andrew
 > 
 > --- kitch-linux/lib/emu/times.C 14 Jun 2004 20:32:57 -0000      1.6
 > +++ kitch-linux/lib/emu/times.C 12 Sep 2005 04:07:29 -0000
 > @@ -42,7 +42,9 @@
 >      ret = now * CLK_TCK / tps;
 > 
 >      // FIXME: need to update buf
 > -    memset (buf, 0, sizeof (*buf));
 > +    if (buf != NULL) {
 > +        memset (buf, 0, sizeof (*buf));
 > +    }
 > 
 >      SYSCALL_EXIT();
 > 
 > _______________________________________________
 > K42-discussion mailing list
 > K42-discussion at ozlabs.org
 > https://ozlabs.org/mailman/listinfo/k42-discussion



More information about the K42-discussion mailing list