Revision: 45563
http://brlcad.svn.sourceforge.net/brlcad/?rev=45563&view=rev
Author: brlcad
Date: 2011-07-21 11:19:16 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
write() returns an ssize_t, simplify test
Modified Paths:
--------------
brlcad/trunk/src/libbu/bomb.c
Modified: brlcad/trunk/src/libbu/bomb.c
===================================================================
--- brlcad/trunk/src/libbu/bomb.c 2011-07-21 07:17:10 UTC (rev 45562)
+++ brlcad/trunk/src/libbu/bomb.c 2011-07-21 11:19:16 UTC (rev 45563)
@@ -108,12 +108,12 @@
fd = open("/dev/tty", 1);
if (LIKELY(fd > 0)) {
if (str && (strlen(str) > 0)) {
- int ret;
size_t len;
+ ssize_t ret;
len = strlen(str);
ret = write(fd, str, len);
- if (ret < 0 || (size_t)ret != len)
+ if (ret != len)
perror("write failed");
ret = write(fd, "\n", 1);
@@ -163,9 +163,9 @@
fd = open("/dev/tty", 1);
if (LIKELY(fd > 0)) {
- int ret;
+ ssize_t ret;
ret = write(fd, "Causing intentional core dump due to debug
flag\n", 48);
- if (ret < 0 || (size_t)ret != 48)
+ if (ret != 48)
perror("write failed");
close(fd);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits