projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe486ef
)
Don't fail in own_buf if items_written is NULL
author
Denis Kenzior
<denkenz@gmail.com>
Fri, 19 Jun 2009 13:03:53 +0000
(08:03 -0500)
committer
Denis Kenzior
<denkenz@gmail.com>
Sat, 20 Jun 2009 02:12:16 +0000
(21:12 -0500)
src/util.c
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index
de509c7
..
84ce507
100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-596,7
+596,7
@@
unsigned char *pack_7bit_own_buf(const unsigned char *in, long len,
long i;
long total_bits;
- if (len == 0
|| !items_written
)
+ if (len == 0)
return NULL;
if (len < 0) {
@@
-651,7
+651,8
@@
unsigned char *pack_7bit_own_buf(const unsigned char *in, long len,
out++;
}
- *items_written = out - buf;
+ if (items_written)
+ *items_written = out - buf;
return buf;
}