diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-07-06 11:14:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-07-06 11:14:11 +0000 |
commit | f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea (patch) | |
tree | b59a38ad9e2296b3d2c8cc3302f21cf6d3ecc458 /src/pq/pq.c | |
parent | 6db64c5eae089e1d81cafbb051f65412790d16bc (diff) | |
download | gnunet-f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea.tar.gz gnunet-f5beb3eaf163fc0bf2a4f86bd413d3ee6939cfea.zip |
-fix misc issues
Diffstat (limited to 'src/pq/pq.c')
-rw-r--r-- | src/pq/pq.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pq/pq.c b/src/pq/pq.c index 43186c41e..46463a190 100644 --- a/src/pq/pq.c +++ b/src/pq/pq.c | |||
@@ -119,15 +119,13 @@ GNUNET_PQ_cleanup_result (struct GNUNET_PQ_ResultSpec *rs) | |||
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Extract results from a query result according to the given | 121 | * Extract results from a query result according to the given |
122 | * specification. If colums are NULL, the destination is not | 122 | * specification. |
123 | * modified, and #GNUNET_NO is returned. | ||
124 | * | 123 | * |
125 | * @param result result to process | 124 | * @param result result to process |
126 | * @param[in,out] rs result specification to extract for | 125 | * @param[in,out] rs result specification to extract for |
127 | * @param row row from the result to extract | 126 | * @param row row from the result to extract |
128 | * @return | 127 | * @return |
129 | * #GNUNET_YES if all results could be extracted | 128 | * #GNUNET_YES if all results could be extracted |
130 | * #GNUNET_NO if at least one result was NULL | ||
131 | * #GNUNET_SYSERR if a result was invalid (non-existing field) | 129 | * #GNUNET_SYSERR if a result was invalid (non-existing field) |
132 | */ | 130 | */ |
133 | int | 131 | int |
@@ -136,7 +134,6 @@ GNUNET_PQ_extract_result (PGresult *result, | |||
136 | int row) | 134 | int row) |
137 | { | 135 | { |
138 | unsigned int i; | 136 | unsigned int i; |
139 | int had_null = GNUNET_NO; | ||
140 | int ret; | 137 | int ret; |
141 | 138 | ||
142 | for (i=0; NULL != rs[i].conv; i++) | 139 | for (i=0; NULL != rs[i].conv; i++) |
@@ -150,7 +147,7 @@ GNUNET_PQ_extract_result (PGresult *result, | |||
150 | spec->fname, | 147 | spec->fname, |
151 | &spec->dst_size, | 148 | &spec->dst_size, |
152 | spec->dst); | 149 | spec->dst); |
153 | if (GNUNET_SYSERR == ret) | 150 | if (GNUNET_OK != ret) |
154 | { | 151 | { |
155 | GNUNET_PQ_cleanup_result (rs); | 152 | GNUNET_PQ_cleanup_result (rs); |
156 | return GNUNET_SYSERR; | 153 | return GNUNET_SYSERR; |
@@ -158,8 +155,6 @@ GNUNET_PQ_extract_result (PGresult *result, | |||
158 | if (NULL != spec->result_size) | 155 | if (NULL != spec->result_size) |
159 | *spec->result_size = spec->dst_size; | 156 | *spec->result_size = spec->dst_size; |
160 | } | 157 | } |
161 | if (GNUNET_YES == had_null) | ||
162 | return GNUNET_NO; | ||
163 | return GNUNET_OK; | 158 | return GNUNET_OK; |
164 | } | 159 | } |
165 | 160 | ||