changeset 52:ba561c21ea27

xread() and xwrite() should take void *, not char *.
author Rob Landley <rob@landley.net>
date Mon, 08 Jan 2007 04:26:01 -0500
parents 63edd4de94dd
children 41d55b5d49fd
files lib/functions.c lib/lib.h
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib/functions.c	Mon Jan 08 03:25:47 2007 -0500
+++ b/lib/functions.c	Mon Jan 08 04:26:01 2007 -0500
@@ -214,12 +214,12 @@
 }
 
 // Die if we can't fill a buffer
-void xread(int fd, char *buf, size_t count)
+void xread(int fd, void *buf, size_t count)
 {
 	if (count != readall(fd, buf, count)) perror_exit("xread");
 }	
 
-void xwrite(int fd, char *buf, size_t count)
+void xwrite(int fd, void *buf, size_t count)
 {
 	if (count != writeall(fd, buf, count)) perror_exit("xwrite");
 }
--- a/lib/lib.h	Mon Jan 08 03:25:47 2007 -0500
+++ b/lib/lib.h	Mon Jan 08 04:26:01 2007 -0500
@@ -46,8 +46,8 @@
 ssize_t rewrite(int fd, void *buf, size_t count);
 ssize_t readall(int fd, void *buf, size_t count);
 ssize_t writeall(int fd, void *buf, size_t count);
-void xread(int fd, char *buf, size_t count);
-void xwrite(int fd, char *buf, size_t count);
+void xread(int fd, void *buf, size_t count);
+void xwrite(int fd, void *buf, size_t count);
 char *xgetcwd(void);
 char *xabspath(char *path);
 struct string_list *find_in_path(char *path, char *filename);