ossp-pkg/sa/sa.c 1.67 -> 1.68
--- sa.c 2002/10/31 07:20:10 1.67
+++ sa.c 2002/11/07 06:24:08 1.68
@@ -1966,8 +1966,8 @@
sa_writef_cb_t *ctx = (sa_writef_cb_t *)_ctx;
if ((ctx->rv = sa_write(ctx->sa, buffer, bufsize, &n)) != SA_OK)
- n = -1;
- return n;
+ return -1;
+ return (int)n;
}
/* write formatted string to socket (convinience function) */
@@ -2198,7 +2198,7 @@
/* format string into temporary buffer */
va_start(ap, cpFmt);
- nBuf = sa_mvsnprintf(NULL, NULL, cpFmt, ap);
+ nBuf = sa_mvsnprintf(NULL, 0, cpFmt, ap);
va_end(ap);
if ((nBuf+1) > sizeof(caBuf)) {
/* requires a larger buffer, so allocate dynamically */
|
|