EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: devAaiCamac.c and devAaoCamac.c
From: Noboru Yamamoto <[email protected]>
To: [email protected]
Date: Fri, 1 Dec 95 01:30:12 JST
Hi,

  in devAaiCamac.c and devAaoCamac.c files, calloc function is used to
allocate memory space for an array by the following code.

    if (paao->ftvl == 0)
        paao->bptr = (char *)calloc(paao->nelm,MAX_STRING_SIZE);
    paao->bptr = (char *)calloc(paao->nelm,sizeofTypes[paao->ftvl]);
    return(0);

In the case of paao->ftvl==0, the first allocated block is just replaced by
new block in the following sentence. 
I think the code ubove should read,

    if (paao->ftvl == 0){
        paao->bptr = (char *)calloc(paao->nelm,MAX_STRING_SIZE);
    }
    else {
         paao->bptr = (char *)calloc(paao->nelm,sizeofTypes[paao->ftvl]);
    }
    return(0);


Any comments?
Noboru Yamamoto
KEK, KEKB accelerator control group.


Navigate by Date:
Prev: Re: Documentation for edd? Rozelle Wright
Next: devAaiCamac.c and devAaoCamac.c (RE:) Johnny Tang
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Documentation for edd? Rozelle Wright
Next: devAaiCamac.c and devAaoCamac.c (RE:) Johnny Tang
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·