native_simulator: constify 'buffer' argument in nsi_host_write()
'buffer' argument is read only, so it can be 'const'. This makes it compatible with POSIX specification of write(3) syscall. Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
This commit is contained in:
parent
bd1f6cc6d7
commit
f9dddc387e
2 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ long nsi_host_read(int fd, void *buffer, unsigned long size);
|
|||
void *nsi_host_realloc(void *ptr, unsigned long size);
|
||||
void nsi_host_srandom(unsigned int seed);
|
||||
char *nsi_host_strdup(const char *s);
|
||||
long nsi_host_write(int fd, void *buffer, unsigned long size);
|
||||
long nsi_host_write(int fd, const void *buffer, unsigned long size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ char *nsi_host_strdup(const char *s)
|
|||
return strdup(s);
|
||||
}
|
||||
|
||||
long nsi_host_write(int fd, void *buffer, unsigned long size)
|
||||
long nsi_host_write(int fd, const void *buffer, unsigned long size)
|
||||
{
|
||||
return write(fd, buffer, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue