projects
/
platform
/
upstream
/
nbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc7b5ac
)
Make this part of the code at least look similar
author
Wouter Verhelst
<w@uter.be>
Sun, 26 Jan 2014 20:23:20 +0000
(21:23 +0100)
committer
Wouter Verhelst
<w@uter.be>
Sun, 26 Jan 2014 20:24:17 +0000
(21:24 +0100)
First we assert that s != NULL.
Then we check if a != NULL, and return -1 if it is. That just makes no sense.
Change the check for a to also be an assertion, and make things at least look similar.
nbdsrv.c
patch
|
blob
|
history
diff --git
a/nbdsrv.c
b/nbdsrv.c
index
508ac27
..
8a388d3
100644
(file)
--- a/
nbdsrv.c
+++ b/
nbdsrv.c
@@
-198,9
+198,7
@@
int append_serve(const SERVER *const s, GArray *const a) {
int ret;
assert(s != NULL);
- if(a == NULL) {
- return -1;
- }
+ assert(a != NULL);
port = g_strdup_printf("%d", s->port);