* Read a numeric value from a pointer, into the value union of a magic * pointer, according to the magic type. Update the string pointer to point * just after the number read. Return 0 for success, non-zero for failure. */
| 1288 | * just after the number read. Return 0 for success, non-zero for failure. |
| 1289 | */ |
| 1290 | static int getvalue(server_rec *s, struct magic *m, char **p) |
| 1291 | { |
| 1292 | int slen; |
| 1293 | |
| 1294 | if (m->type == STRING) { |
| 1295 | *p = getstr(s, *p, m->value.s, sizeof(m->value.s), &slen); |
| 1296 | m->vallen = slen; |
| 1297 | } |
| 1298 | else if (m->reln != 'x') |
| 1299 | m->value.l = signextend(s, m, strtol(*p, p, 0)); |
| 1300 | return 0; |
| 1301 | } |
| 1302 | |
| 1303 | /* |
| 1304 | * Convert a string containing C character escapes. Stop at an unescaped |
no test coverage detected