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
<1995>
1996
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
<1995>
1996
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
|