fix clang build

This commit is contained in:
William Hubbs 2019-08-20 16:06:46 -05:00
parent a177d15641
commit 8e31614c4b
2 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ void sysvinit_runlevel(char rl)
/* /*
* Set environment variables in the init process. * Set environment variables in the init process.
*/ */
void sysvinit_setenv(char *name, char *value) void sysvinit_setenv(const char *name, const char *value)
{ {
struct init_request request; struct init_request request;
size_t nl; size_t nl;
@ -90,7 +90,7 @@ else
vl = 0; vl = 0;
if (nl + vl + 3 >= (int)sizeof(request.i.data)) if (nl + vl + 3 >= (int)sizeof(request.i.data))
return -1; return;
memcpy(request.i.data, name, nl); memcpy(request.i.data, name, nl);
if (value) { if (value) {
@ -98,5 +98,5 @@ else
memcpy(request.i.data + nl + 1, value, vl); memcpy(request.i.data + nl + 1, value, vl);
} }
sysvinit_send_cmd(&request); sysvinit_send_cmd(&request);
return 0; return;
} }

View File

@ -67,6 +67,6 @@ struct init_request {
}; };
void sysvinit_runlevel(char rl); void sysvinit_runlevel(char rl);
void sysvinit_setenv(char *name, char *value); void sysvinit_setenv(const char *name, const char *value);
#endif #endif