Update of /cvsroot/monetdb/clients/src/mapiclient
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16957
Modified Files:
MapiClient.mx
Log Message:
Solaris doesn't like printing a pid_t (getpid()) as int, so use a
cast.
Use sizeof(buf) instead of repeating the numbers, sometimes far from
where buf was declared.
Index: MapiClient.mx
===================================================================
RCS file: /cvsroot/monetdb/clients/src/mapiclient/MapiClient.mx,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- MapiClient.mx 17 Aug 2007 12:09:49 -0000 1.58
+++ MapiClient.mx 17 Aug 2007 15:29:57 -0000 1.59
@@ -695,7 +695,7 @@
}
if (oldfields)
SQLseparator(len, oldfields, '-');
- snprintf(buf, 50, "%d rows", mapi_get_row_count(hdl));
+ snprintf(buf, sizeof(buf), "%d rows", mapi_get_row_count(hdl));
mark2 = strdup(buf);
}
@@ -1180,7 +1180,7 @@
for (; *line && isspace((int) *line);
line++)
;
if (*line == 0) {
- snprintf(buf, 1024, "monet_%d",
getpid());
+ snprintf(buf, sizeof(buf),
"monet_%d", (int) getpid());
line = buf;
}
logfile = optarg ? optarg :
strdup(line);
@@ -1548,7 +1548,7 @@
{
char buf[1024];
- snprintf(buf, 1024, "monet_%d", getpid());
+ snprintf(buf, sizeof(buf), "monet_%d", (int) getpid());
logfile = optarg ? optarg : strdup(buf);
break;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins