# | Line 35 | Line 35 | static char error_arg[ERROR_ARG_MAX]; | |
---|---|---|
35 | ||
36 | void sg_set_error(sg_error code, const char *arg) { | |
37 | error = code; | |
38 | < | strlcpy(error_arg, arg, sizeof error_arg); |
38 | > | if (arg != NULL) { |
39 | > | strlcpy(error_arg, arg, sizeof error_arg); |
40 | > | } |
41 | > | else { |
42 | > | /* FIXME is this the best idea? */ |
43 | > | error_arg[0] = '\0'; |
44 | > | } |
45 | } | |
46 | ||
47 | sg_error sg_get_error() { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |