1
1

Use const for the opal_fd_write() function, just to be nice.

This commit was SVN r23452.
Этот коммит содержится в:
Jeff Squyres 2010-07-21 11:01:16 +00:00
родитель 3031b59cfe
Коммит b3952e4f07
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -44,10 +44,10 @@ int opal_fd_read(int fd, int len, void *buffer)
/* /*
* Simple loop over writing to an fd * 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; int rc;
char *b = buffer; const char *b = buffer;
while (len > 0) { while (len > 0) {
rc = write(fd, b, len); 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 * Loop over writing to the fd until len bytes are written or an error
* occurs. EAGAIN and EINTR are transparently handled. * 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 #endif