Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
75c6e770
Commit
75c6e770
authored
Aug 28, 2009
by
Ivan Donchevskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning CycleStorage and TableBlockStorage if creating
parent
0a2068c0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
CycleStorage.cc
src/Various/CycleStorage.cc
+4
-1
TableBlockStorage.cc
src/Various/TableBlockStorage.cc
+3
-0
No files found.
src/Various/CycleStorage.cc
View file @
75c6e770
...
...
@@ -203,6 +203,8 @@ bool CycleStorage::create(const char* name, int inf_sz, int inf_count, int seek)
if
(
fseek
(
file
,
seekpos
,
0
)
==-
1
)
return
false
;
CycleStorageElem
*
jrn
=
(
CycleStorageElem
*
)
new
char
[
full_size
];
for
(
int
i
=
0
;
i
<
full_size
;
i
++
)
*
((
char
*
)
jrn
+
i
)
=
0
;
jrn
->
status
=
0
;
/*! */
...
...
@@ -232,7 +234,8 @@ bool CycleStorage::addRow(void* str)
if
(
file
==
NULL
)
return
false
;
CycleStorageElem
*
jrn
=
(
CycleStorageElem
*
)
new
char
[
full_size
];
int
i
=
0
;
for
(
i
=
0
;
i
<
full_size
;
i
++
)
*
((
char
*
)
jrn
+
i
)
=
0
;
/*! 2 - (head=-1), 1 (head=tail=0) )
*/
...
...
src/Various/TableBlockStorage.cc
View file @
75c6e770
...
...
@@ -210,6 +210,9 @@ bool TableBlockStorage::create(const char* name, int key_sz, int inf_sz, int inf
/*! */
mem
=
(
TableBlockStorageElem
*
)
new
char
[
block_size
*
full_size
];
for
(
i
=
0
;
i
<
block_size
*
full_size
;
i
++
)
*
((
char
*
)
mem
+
i
)
=
0
;
StorageAttr
sa
;
sa
.
k_size
=
k_size
;
sa
.
inf_size
=
inf_size
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment