[Pinfo-devel] r130 - pinfo/branches/cxx/src
Nathanael Nerode
neroden-guest at costa.debian.org
Fri Sep 2 04:52:43 UTC 2005
Author: neroden-guest
Date: 2005-09-02 04:52:42 +0000 (Fri, 02 Sep 2005)
New Revision: 130
Modified:
pinfo/branches/cxx/src/filehandling_functions.cxx
Log:
Continue converting; inodes is now a vector.
Modified: pinfo/branches/cxx/src/filehandling_functions.cxx
===================================================================
--- pinfo/branches/cxx/src/filehandling_functions.cxx 2005-09-02 04:46:50 UTC (rev 129)
+++ pinfo/branches/cxx/src/filehandling_functions.cxx 2005-09-02 04:52:42 UTC (rev 130)
@@ -826,7 +826,6 @@
unsigned int numpaths = 0;
size_t len;
struct stat sbuf;
- ino_t *inodes;
/* first concat the paths */
string infopath;
@@ -908,11 +907,12 @@
/* ok, now we have all the (possibly) revelevant paths in paths[] */
/* now loop over them, see if they are valid and if they are duplicates*/
- inodes = (ino_t *) xmalloc( maxpaths * sizeof(ino_t *) );
+ vector<ino_t> inodes;
numpaths = 0;
len = 0;
for (i=0; i< maxpaths; i++)
{
+ inodes.push_back(0);
/* stat() the dir */
ret = stat( paths[i], &sbuf);
/* and see if it could be opened */
@@ -962,7 +962,6 @@
}
xfree(paths);
- xfree(inodes);
#ifdef ___DEBUG___
/* for debugging */
More information about the Pinfo-devel
mailing list