# | Line 28 | Line 28 | |
---|---|---|
28 | #include <stdlib.h> | |
29 | ||
30 | #include "statgrab.h" | |
31 | + | #include "tools.h" |
32 | ||
33 | static sg_error error = SG_ERROR_NONE; | |
34 | #define ERROR_ARG_MAX 256 | |
# | Line 36 | Line 37 | static char error_arg[ERROR_ARG_MAX]; | |
37 | void sg_set_error(sg_error code, const char *arg) { | |
38 | error = code; | |
39 | if (arg != NULL) { | |
40 | < | strlcpy(error_arg, arg, sizeof error_arg); |
40 | > | sg_strlcpy(error_arg, arg, sizeof error_arg); |
41 | } | |
42 | else { | |
43 | /* FIXME is this the best idea? */ |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |