- removed unused pointer shifting in dset.c
- small reworking of lval_assign()
... | ... |
@@ -380,7 +380,7 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg, |
380 | 380 |
struct rvalue* rv; |
381 | 381 |
int ret; |
382 | 382 |
|
383 |
- ret=0; |
|
383 |
+ ret=-1; |
|
384 | 384 |
rv=rval_expr_eval(h, msg, rve); |
385 | 385 |
if (unlikely(rv==0)){ |
386 | 386 |
LM_ERR("rval expression evaluation failed (%d,%d-%d,%d)\n", |
... | ... |
@@ -404,9 +404,7 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg, |
404 | 404 |
LM_ERR("assignment failed at pos: (%d,%d-%d,%d)\n", |
405 | 405 |
rve->fpos.s_line, rve->fpos.s_col, |
406 | 406 |
rve->fpos.e_line, rve->fpos.e_col); |
407 |
- } |
|
408 |
- else |
|
409 |
- { |
|
407 |
+ } else { |
|
410 | 408 |
if(unlikely(_log_assign_action!=NULL)) |
411 | 409 |
_log_assign_action(msg, lv); |
412 | 410 |
} |
... | ... |
@@ -414,5 +412,5 @@ int lval_assign(struct run_act_ctx* h, struct sip_msg* msg, |
414 | 412 |
return ret; |
415 | 413 |
error: |
416 | 414 |
if (rv) rval_destroy(rv); |
417 |
- return -1; |
|
415 |
+ return ret; |
|
418 | 416 |
} |
... | ... |
@@ -56,7 +56,7 @@ struct str_hash_table{ |
56 | 56 |
/* returns 0 on success, <0 on failure */ |
57 | 57 |
inline static int str_hash_alloc(struct str_hash_table* ht, int size) |
58 | 58 |
{ |
59 |
- ht->table=(struct str_hash_head*)pkg_malloc(sizeof(struct str_hash_head)*size); |
|
59 |
+ ht->table=(struct str_hash_head*)pkg_mallocxz(sizeof(struct str_hash_head)*size); |
|
60 | 60 |
if (ht->table==0) { |
61 | 61 |
PKG_MEM_ERROR; |
62 | 62 |
return -1; |