summaryrefslogtreecommitdiffstats
path: root/cups/spp.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-07-26 13:32:44 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-07-26 13:32:44 +0000
commitb102348e988e4abc5d579ce13c067ce2c885aaf7 (patch)
treef7df67ce818aa8720f956171765889684c528ee1 /cups/spp.c
parentabaf87668c896d8cebcfa1081eec195cd0008740 (diff)
Fix declared with attribute warn_unused_result errors
Diffstat (limited to 'cups/spp.c')
-rw-r--r--cups/spp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cups/spp.c b/cups/spp.c
index 968cd61e..0350280b 100644
--- a/cups/spp.c
+++ b/cups/spp.c
@@ -38,7 +38,7 @@ int spp_print(bdaddr_t *src, bdaddr_t *dst, uint8_t channel, int fd, int copies)
{
struct sockaddr_rc addr;
unsigned char buf[2048];
- int i, sk, len;
+ int i, sk, err, len;
if ((sk = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) {
perror("ERROR: Can't create socket");
@@ -87,7 +87,7 @@ int spp_print(bdaddr_t *src, bdaddr_t *dst, uint8_t channel, int fd, int copies)
}
while ((len = read(fd, buf, sizeof(buf))) > 0) {
- write(sk, buf, len);
+ err = write(sk, buf, len);
}
}