Revision: 65502
http://sourceforge.net/p/brlcad/code/65502
Author: carlmoore
Date: 2015-06-30 20:30:57 +0000 (Tue, 30 Jun 2015)
Log Message:
-----------
no need to pass scanlen as argument to init_buffer, because it's present as a
global; also change max's type
Modified Paths:
--------------
brlcad/trunk/src/util/bwcrop.c
Modified: brlcad/trunk/src/util/bwcrop.c
===================================================================
--- brlcad/trunk/src/util/bwcrop.c 2015-06-30 19:52:27 UTC (rev 65501)
+++ brlcad/trunk/src/util/bwcrop.c 2015-06-30 20:30:57 UTC (rev 65502)
@@ -66,12 +66,12 @@
* XXX - CHECK FILE SIZE
*/
void
-init_buffer(int len)
+init_buffer()
{
- int max;
+ ssize_t max;
/* See how many we could buffer */
- max = MAXBUFBYTES / len;
+ max = MAXBUFBYTES / scanlen;
/*
* Do a max of 4096. We really should see how big
@@ -87,7 +87,7 @@
else
buflines = scanlen;
- buffer = (unsigned char *)bu_malloc(buflines * len, "buffer");
+ buffer = (unsigned char *)bu_malloc(buflines * scanlen, "buffer");
}
@@ -239,7 +239,7 @@
}
/* See how many lines we can buffer */
- init_buffer(scanlen);
+ init_buffer();
/* Check for silly buffer syndrome */
if ((ssize_t)abs((int)(ury - uly)) > buflines/2 || (ssize_t)abs((int)(lry
- lly)) > buflines/2) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits