Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
79832844
Commit
79832844
authored
May 03, 2010
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix two potential uninitialization errors and an unneeded assignment.
Found using Clang's static analyzer.
parent
8ffe7bbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Modules/bsddbmodule.c
Modules/bsddbmodule.c
+6
-4
No files found.
Modules/bsddbmodule.c
View file @
79832844
...
...
@@ -270,11 +270,12 @@ bsddb_subscript(bsddbobject *dp, PyObject *key)
{
int
status
;
DBT
krec
,
drec
;
char
*
data
,
buf
[
4096
];
char
*
data
=
NULL
;
char
buf
[
4096
];
int
size
;
PyObject
*
result
;
recno_t
recno
;
if
(
dp
->
di_type
==
DB_RECNO
)
{
if
(
!
PyArg_Parse
(
key
,
"i"
,
&
recno
))
{
PyErr_SetString
(
PyExc_TypeError
,
...
...
@@ -503,7 +504,8 @@ bsddb_set_location(bsddbobject *dp, PyObject *key)
{
int
status
;
DBT
krec
,
drec
;
char
*
data
,
buf
[
4096
];
char
*
data
=
NULL
;
char
buf
[
4096
];
int
size
;
PyObject
*
result
;
recno_t
recno
;
...
...
@@ -635,7 +637,7 @@ bsddb_sync(bsddbobject *dp)
PyErr_SetFromErrno
(
BsddbError
);
return
NULL
;
}
return
PyInt_FromLong
(
status
=
0
);
return
PyInt_FromLong
(
0
);
}
static
PyMethodDef
bsddb_methods
[]
=
{
{
"close"
,
(
PyCFunction
)
bsddb_close
,
METH_NOARGS
},
...
...
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