MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / db_int2str

Function db_int2str

db/db_ut.c:114–131  ·  view source on GitHub ↗

* Convert an integer to string */

Source from the content-addressed store, hash-verified

112 * Convert an integer to string
113 */
114inline int db_int2str(int _v, char* _s, int* _l)
115{
116 int ret;
117
118 if ((!_s) || (!_l) || (!*_l)) {
119 LM_ERR("Invalid parameter value\n");
120 return -1;
121 }
122
123 ret = snprintf(_s, *_l, "%-d", _v);
124 if (ret < 0 || ret >= *_l) {
125 LM_ERR("Error in snprintf\n");
126 return -1;
127 }
128 *_l = ret;
129
130 return 0;
131}
132
133
134/*

Callers 7

db_mysql_val2strFunction · 0.85
db_unixodbc_val2strFunction · 0.85
db_sqlite_val2strFunction · 0.85
bdb_val2strFunction · 0.85
ph_build_form_imputFunction · 0.85
ph_run_pi_cmdFunction · 0.85
db_postgres_val2strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected