# | Line 45 | Line 45 | |
---|---|---|
45 | #endif | |
46 | ||
47 | #include "tools.h" | |
48 | + | #include "statgrab.h" |
49 | ||
50 | #ifdef SOLARIS | |
51 | #ifdef HAVE_LIBDEVINFO_H | |
# | Line 501 | Line 502 | int sg_drop_privileges() { | |
502 | if (setegid(getgid()) != 0) return -1; | |
503 | if (seteuid(getuid()) != 0) return -1; | |
504 | return 0; | |
505 | + | } |
506 | + | |
507 | + | void *sg_realloc(void *ptr, size_t size) { |
508 | + | void *tmp = NULL; |
509 | + | tmp = realloc(ptr, size); |
510 | + | if(tmp == NULL) { |
511 | + | sg_set_error(SG_ERROR_MALLOC_FAILED, NULL); |
512 | + | } |
513 | + | return tmp; |
514 | } | |
515 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |