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

Function db_double2str

db/db_ut.c:160–177  ·  view source on GitHub ↗

* Convert a double to string */

Source from the content-addressed store, hash-verified

158 * Convert a double to string
159 */
160inline int db_double2str(double _v, char* _s, int* _l)
161{
162 int ret;
163
164 if ((!_s) || (!_l) || (!*_l)) {
165 LM_ERR("Invalid parameter value\n");
166 return -1;
167 }
168
169 ret = snprintf(_s, *_l, "%-10.2f", _v);
170 if (ret < 0 || ret >= *_l) {
171 LM_ERR("Error in snprintf\n");
172 return -1;
173 }
174 *_l = ret;
175
176 return 0;
177}
178
179
180/*

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