| 187 | |
| 188 | |
| 189 | static int append_keys (var_str * q,const char * name, const db_key_t* k, |
| 190 | int n, int * started ) |
| 191 | { |
| 192 | int i; |
| 193 | |
| 194 | if( k != NULL) |
| 195 | { |
| 196 | if( *started ) |
| 197 | CHECK(append_const(q,"&"),0,error); |
| 198 | |
| 199 | CHECK(append_const(q,(char*)name),0,error); |
| 200 | CHECK(append_const(q,"="),0,error); |
| 201 | |
| 202 | for(i=0;i<n;i++) |
| 203 | { |
| 204 | |
| 205 | CHECK(append_str(q,url_encode(*k[i])),0,error); |
| 206 | if( i < n-1) |
| 207 | CHECK(append_const(q,val_delim_s),0,error); |
| 208 | } |
| 209 | *started = 1; |
| 210 | } |
| 211 | |
| 212 | return 0; |
| 213 | |
| 214 | error: |
| 215 | return -1; |
| 216 | |
| 217 | } |
| 218 | |
| 219 | static int append_values (var_str * q,const char * name, const db_val_t* v, |
| 220 | int n, int * started ) |
no test coverage detected