Use const for the opal_fd_write() function, just to be nice.
This commit was SVN r23452.
Этот коммит содержится в:
родитель
3031b59cfe
Коммит
b3952e4f07
@ -44,10 +44,10 @@ int opal_fd_read(int fd, int len, void *buffer)
|
||||
/*
|
||||
* Simple loop over writing to an fd
|
||||
*/
|
||||
int opal_fd_write(int fd, int len, void *buffer)
|
||||
int opal_fd_write(int fd, int len, const void *buffer)
|
||||
{
|
||||
int rc;
|
||||
char *b = buffer;
|
||||
const char *b = buffer;
|
||||
|
||||
while (len > 0) {
|
||||
rc = write(fd, b, len);
|
||||
|
@ -44,6 +44,6 @@ OPAL_DECLSPEC int opal_fd_read(int fd, int len, void *buffer);
|
||||
* Loop over writing to the fd until len bytes are written or an error
|
||||
* occurs. EAGAIN and EINTR are transparently handled.
|
||||
*/
|
||||
OPAL_DECLSPEC int opal_fd_write(int fd, int len, void *buffer);
|
||||
OPAL_DECLSPEC int opal_fd_write(int fd, int len, const void *buffer);
|
||||
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user