74 |
|
#endif |
75 |
|
|
76 |
|
#ifdef SOLARIS |
77 |
< |
char *get_svr_from_bsd(char *bsd){ |
77 |
> |
const char *get_svr_from_bsd(const char *bsd){ |
78 |
|
#ifdef HAVE_LIBDEVINFO_H |
79 |
|
mapping_t *map_ptr; |
80 |
|
for(map_ptr = mapping; map_ptr != NULL; map_ptr = map_ptr->next) |
410 |
|
} |
411 |
|
|
412 |
|
#endif |
413 |
+ |
|
414 |
+ |
char *update_string(char **dest, const char *src) { |
415 |
+ |
char *new; |
416 |
+ |
|
417 |
+ |
new = realloc(*dest, strlen(src) + 1); |
418 |
+ |
if (new == NULL) { |
419 |
+ |
return NULL; |
420 |
+ |
} |
421 |
+ |
|
422 |
+ |
strcpy(new, src); |
423 |
+ |
*dest = new; |
424 |
+ |
return new; |
425 |
+ |
} |
426 |
|
|
427 |
|
long long get_ll_match(char *line, regmatch_t *match){ |
428 |
|
char *ptr; |