s->data = (unsigned char *)p;
}
- (void) snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900,
+ snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900,
ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec);
s->length = strlen(p);
s->type = V_ASN1_GENERALIZEDTIME;
if ((minsize > 0) && (nchar < minsize)) {
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
- (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize);
+ snprintf(strbuf, sizeof strbuf, "%ld", minsize);
ERR_add_error_data(2, "minsize=", strbuf);
return -1;
}
if ((maxsize > 0) && (nchar > maxsize)) {
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
- (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
+ snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
ERR_add_error_data(2, "maxsize=", strbuf);
return -1;
}
if(c > 0xffffffffL)
return -1;
if(c > 0xffff) {
- (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
+ snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
if(!io_ch(arg, tmphex, 10)) return -1;
return 10;
}
if(c > 0xff) {
- (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
+ snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
if(!io_ch(arg, tmphex, 6)) return -1;
return 6;
}
return 2;
}
if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) {
- (void) snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp);
+ snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp);
if(!io_ch(arg, tmphex, 3)) return -1;
return 3;
}
s->data=(unsigned char *)p;
}
- (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
+ snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
s->length=strlen(p);
s->type=V_ASN1_UTCTIME;
{
char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1];
- (void) snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address);
- (void) snprintf(buf2, sizeof buf2, "%d", offset);
+ snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address);
+ snprintf(buf2, sizeof buf2, "%d", offset);
ERR_add_error_data(4, "address=", buf1, " offset=", buf2);
}
p = str;
if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
- (void) snprintf(str, sizeof str, "priv [ %d ] ", tag);
+ snprintf(str, sizeof str, "priv [ %d ] ", tag);
else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
- (void) snprintf(str, sizeof str, "cont [ %d ]", tag);
+ snprintf(str, sizeof str, "cont [ %d ]", tag);
else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
- (void) snprintf(str, sizeof str, "appl [ %d ]", tag);
+ snprintf(str, sizeof str, "appl [ %d ]", tag);
else if (tag > 30)
- (void) snprintf(str, sizeof str, "<ASN1 %d>", tag);
+ snprintf(str, sizeof str, "<ASN1 %d>", tag);
else
p = ASN1_tag2str(tag);
for (i = 0; i < rows; i++) {
buf[0] = '\0'; /* start with empty string */
strlcpy(buf, str, sizeof buf);
- (void) snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
+ snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
strlcat(buf, tmp, sizeof buf);
for (j = 0; j < dump_width; j++) {
if (((i*dump_width) + j) >= len) {
strlcat(buf, " ", sizeof buf);
} else {
ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff;
- (void) snprintf(tmp, sizeof tmp, "%02x%c", ch,
+ snprintf(tmp, sizeof tmp, "%02x%c", ch,
j == 7 ? '-' : ' ');
strlcat(buf, tmp, sizeof buf);
}
if (((i*dump_width) + j) >= len)
break;
ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff;
- (void) snprintf(tmp, sizeof tmp, "%c",
+ snprintf(tmp, sizeof tmp, "%c",
((ch >= ' ') && (ch <= '~')) ? ch : '.');
strlcat(buf, tmp, sizeof buf);
}
}
#ifdef TRUNCATE
if (trc > 0) {
- (void) snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n",
+ snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n",
str, len + trc);
ret += cb((void *)buf, strlen(buf), u);
}
goto end;
}
*addr = p;
- (void) snprintf(*addr, nl, "%s:%s", h, s);
+ snprintf(*addr, nl, "%s:%s", h, s);
goto end;
} while (0);
#endif
}
*addr = p;
}
- (void) snprintf(*addr, 24, "%d.%d.%d.%d:%d",
+ snprintf(*addr, 24, "%d.%d.%d.%d:%d",
(unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff,
(unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port);
if (BIO_CB_RETURN & cmd)
r = ret;
- (void) snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
+ snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
p = &(buf[14]);
p_maxlen = sizeof buf - 14;
switch (cmd) {
case BIO_CB_FREE:
- (void) snprintf(p, p_maxlen, "Free - %s\n", bio->method->name);
+ snprintf(p, p_maxlen, "Free - %s\n", bio->method->name);
break;
case BIO_CB_READ:
if (bio->method->type & BIO_TYPE_DESCRIPTOR)
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"read(%d,%lu) - %s fd=%d\n",
bio->num, (unsigned long)argi,
bio->method->name, bio->num);
else
- (void) snprintf(p, p_maxlen, "read(%d,%lu) - %s\n",
+ snprintf(p, p_maxlen, "read(%d,%lu) - %s\n",
bio->num, (unsigned long)argi, bio->method->name);
break;
case BIO_CB_WRITE:
if (bio->method->type & BIO_TYPE_DESCRIPTOR)
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"write(%d,%lu) - %s fd=%d\n",
bio->num, (unsigned long)argi,
bio->method->name, bio->num);
else
- (void) snprintf(p, p_maxlen, "write(%d,%lu) - %s\n",
+ snprintf(p, p_maxlen, "write(%d,%lu) - %s\n",
bio->num, (unsigned long)argi, bio->method->name);
break;
case BIO_CB_PUTS:
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"puts() - %s\n", bio->method->name);
break;
case BIO_CB_GETS:
- (void) snprintf(p, p_maxlen, "gets(%lu) - %s\n",
+ snprintf(p, p_maxlen, "gets(%lu) - %s\n",
(unsigned long)argi, bio->method->name);
break;
case BIO_CB_CTRL:
- (void) snprintf(p, p_maxlen, "ctrl(%lu) - %s\n",
+ snprintf(p, p_maxlen, "ctrl(%lu) - %s\n",
(unsigned long)argi, bio->method->name);
break;
case BIO_CB_RETURN|BIO_CB_READ:
- (void) snprintf(p, p_maxlen, "read return %ld\n", ret);
+ snprintf(p, p_maxlen, "read return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_WRITE:
- (void) snprintf(p, p_maxlen, "write return %ld\n", ret);
+ snprintf(p, p_maxlen, "write return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_GETS:
- (void) snprintf(p, p_maxlen, "gets return %ld\n", ret);
+ snprintf(p, p_maxlen, "gets return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_PUTS:
- (void) snprintf(p, p_maxlen, "puts return %ld\n", ret);
+ snprintf(p, p_maxlen, "puts return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_CTRL:
- (void) snprintf(p, p_maxlen, "ctrl return %ld\n", ret);
+ snprintf(p, p_maxlen, "ctrl return %ld\n", ret);
break;
default:
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"bio callback - unknown type (%d)\n", cmd);
break;
}
char buf[16];
unsigned char *p = ptr;
- (void) snprintf(buf, sizeof buf, "%d.%d.%d.%d",
+ snprintf(buf, sizeof buf, "%d.%d.%d.%d",
p[0], p[1], p[2], p[3]);
if (data->param_hostname != NULL)
free(data->param_hostname);
} else if (num == 3) {
char buf[DECIMAL_SIZE(int) + 1];
- (void) snprintf(buf, sizeof buf, "%d",
+ snprintf(buf, sizeof buf, "%d",
*(int *)ptr);
if (data->param_port != NULL)
free(data->param_port);
/* We now have a series of blocks, BN_DEC_NUM chars
* in length, where the last one needs truncation.
* The blocks need to be reversed in order. */
- (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
+ snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
while (*p) p++;
while (lp != bn_data)
{
lp--;
- (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
+ snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
while (*p) p++;
}
}
{
init++;
#ifdef BN_LLONG
- (void) snprintf(data,sizeof data,"bn(%d,%d)",
+ snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
#else
- (void) snprintf(data,sizeof data,"bn(%d,%d)",
+ snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
#endif
}
if (buff != NULL) BUF_MEM_free(buff);
if (section != NULL) free(section);
if (line != NULL) *line=eline;
- (void) snprintf(btmp,sizeof btmp,"%ld",eline);
+ snprintf(btmp,sizeof btmp,"%ld",eline);
ERR_add_error_data(2,"line ",btmp);
if ((h != conf->data) && (conf->data != NULL))
{
{
char rcode[DECIMAL_SIZE(ret)+1];
CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
- (void) snprintf(rcode, sizeof rcode, "%-8d", ret);
+ snprintf(rcode, sizeof rcode, "%-8d", ret);
ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
}
}
#ifdef DATE
static char buf[sizeof(DATE) + 11];
- (void) snprintf(buf, sizeof buf, "built on: %s", DATE);
+ snprintf(buf, sizeof buf, "built on: %s", DATE);
return (buf);
#else
return("built on: date not available");
#ifdef CFLAGS
static char buf[sizeof(CFLAGS) + 11];
- (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
+ snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
return (buf);
#else
return("compiler: information not available");
#ifdef PLATFORM
static char buf[sizeof(PLATFORM) + 11];
- (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
+ snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
return (buf);
#else
return("platform: information not available");
size="int";
else
size="long";
- (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+ snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
size);
init=0;
}
#endif
/* Generate a nice engine name with available features */
- (void) snprintf(padlock_name, sizeof(padlock_name),
+ snprintf(padlock_name, sizeof(padlock_name),
"VIA PadLock (%s, %s)",
padlock_use_rng ? "RNG" : "no-RNG",
padlock_use_ace ? "ACE" : "no-ACE");
rs=ERR_reason_error_string(e);
if (ls == NULL)
- (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
+ snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
if (fs == NULL)
- (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
+ snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
if (rs == NULL)
- (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
+ snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
- (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
+ snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
fs?fs:fsbuf, rs?rs:rsbuf);
if (strlen(buf) == len-1)
{
while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
{
ERR_error_string_n(l, buf, sizeof buf);
- (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
+ snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
file, line, (flags & ERR_TXT_STRING) ? data : "");
if (cb(buf2, strlen(buf2), u) <= 0)
break; /* abort outputting the error report */
}
else
{
- (void) snprintf(tbuf,sizeof tbuf,".%lu",l);
+ snprintf(tbuf,sizeof tbuf,".%lu",l);
i=strlen(tbuf);
if (buf && (buf_len > 0))
{
(char *)kstr, klen,
cb, u);
- (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
+ snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
pem_str,bp,x,enc,kstr,klen,cb,u);
}
if (!x->ameth || !x->ameth->param_encode)
return 0;
- (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
+ snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
return PEM_ASN1_write_bio(
(i2d_of_void *)x->ameth->param_encode,
pem_str,bp,x,NULL,NULL,0,0,NULL);
if the elements correspond to 0, they MUST be wholly
omitted, and the decimal point element also MUST be
omitted." */
- (void)snprintf(usecstr, sizeof(usecstr), ".%06ld", usec);
+ snprintf(usecstr, sizeof(usecstr), ".%06ld", usec);
/* truncate and trim trailing 0 */
usecstr[precision + 1] = '\0';
p = usecstr + strlen(usecstr) - 1;
char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1];
char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1];
- (void) snprintf(number1, sizeof(number1), "%d",
+ snprintf(number1, sizeof(number1), "%d",
uis->_.string_data.result_minsize);
- (void) snprintf(number2, sizeof(number2), "%d",
+ snprintf(number2, sizeof(number2), "%d",
uis->_.string_data.result_maxsize);
if (l < uis->_.string_data.result_minsize) {
hent = NULL;
}
for (;;) {
- (void) snprintf(b->data, b->max, "%s/%08lx.%s%d",
+ snprintf(b->data, b->max, "%s/%08lx.%s%d",
ent->dir, h, postfix, k);
#ifndef OPENSSL_NO_POSIX_IO
return("CRL path validation error");
default:
- (void) snprintf(buf,sizeof buf,"error number %ld",n);
+ snprintf(buf,sizeof buf,"error number %ld",n);
return(buf);
}
}
case GEN_IPADD:
p = gen->d.ip->data;
if(gen->d.ip->length == 4)
- (void) snprintf(oline, sizeof oline,
+ snprintf(oline, sizeof oline,
"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
else if(gen->d.ip->length == 16)
{
oline[0] = 0;
for (i = 0; i < 8; i++)
{
- (void) snprintf(htmp, sizeof htmp,
+ snprintf(htmp, sizeof htmp,
"%X", p[0] << 8 | p[1]);
p += 2;
strlcat(oline, htmp, sizeof(oline));
if (suffix == NULL)
strlcpy(buf[0], serialfile, BSIZE);
else
- (void) snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix);
+ snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix);
#ifdef RL_DEBUG
BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
#endif
BIO_printf(bio_err, "file name too long\n");
goto err;
}
- (void) snprintf(buf[0], sizeof buf[0], "%s.%s",
+ snprintf(buf[0], sizeof buf[0], "%s.%s",
serialfile, new_suffix);
- (void) snprintf(buf[1], sizeof buf[1], "%s.%s",
+ snprintf(buf[1], sizeof buf[1], "%s.%s",
serialfile, old_suffix);
#ifdef RL_DEBUG
BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
if ((tmpdb = TXT_DB_read(in, DB_NUMBER)) == NULL)
goto err;
- (void) snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile);
+ snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile);
dbattr_conf = NCONF_new(NULL);
if (NCONF_load(dbattr_conf, buf[0], &errorline) <= 0) {
if (errorline > 0) {
BIO_printf(bio_err, "file name too long\n");
goto err;
}
- (void) snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile);
- (void) snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix);
- (void) snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix);
+ snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile);
+ snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix);
+ snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix);
#ifdef RL_DEBUG
BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]);
#endif
BIO_printf(bio_err, "file name too long\n");
goto err;
}
- (void) snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile);
- (void) snprintf(buf[2], sizeof buf[2], "%s.attr.%s",
+ snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile);
+ snprintf(buf[2], sizeof buf[2], "%s.attr.%s",
dbfile, new_suffix);
- (void) snprintf(buf[0], sizeof buf[0], "%s.%s",
+ snprintf(buf[0], sizeof buf[0], "%s.%s",
dbfile, new_suffix);
- (void) snprintf(buf[1], sizeof buf[1], "%s.%s",
+ snprintf(buf[1], sizeof buf[1], "%s.%s",
dbfile, old_suffix);
- (void) snprintf(buf[3], sizeof buf[3], "%s.attr.%s",
+ snprintf(buf[3], sizeof buf[3], "%s.attr.%s",
dbfile, old_suffix);
#ifdef RL_DEBUG
BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n",
for (k = 0; k < j; k++) {
if (n >= &(buf[2][sizeof(buf[2])]))
break;
- (void) snprintf(n,
+ snprintf(n,
&buf[2][0] + sizeof(buf[2]) - n,
"%02X", (unsigned char) *(p++));
n += 2;
for (;;) {
char buf[200];
- (void) snprintf(buf, sizeof buf, "enter %s %s password:",
+ snprintf(buf, sizeof buf, "enter %s %s password:",
OBJ_nid2ln(EVP_CIPHER_nid(cipher)),
(enc) ? "encryption" : "decryption");
strbuf[0] = '\0';
ERR_clear_error();
def = "";
}
- (void) snprintf(buf, sizeof buf, "%s_value", v->name);
+ snprintf(buf, sizeof buf, "%s_value", v->name);
if ((value = NCONF_get_string(req_conf, dn_sect, buf)) == NULL) {
ERR_clear_error();
value = NULL;
}
- (void) snprintf(buf, sizeof buf, "%s_min", v->name);
+ snprintf(buf, sizeof buf, "%s_min", v->name);
if (!NCONF_get_number(req_conf, dn_sect, buf, &n_min)) {
ERR_clear_error();
n_min = -1;
}
- (void) snprintf(buf, sizeof buf, "%s_max", v->name);
+ snprintf(buf, sizeof buf, "%s_max", v->name);
if (!NCONF_get_number(req_conf, dn_sect, buf, &n_max)) {
ERR_clear_error();
n_max = -1;
ERR_clear_error();
def = "";
}
- (void) snprintf(buf, sizeof buf, "%s_value", type);
+ snprintf(buf, sizeof buf, "%s_value", type);
if ((value = NCONF_get_string(req_conf, attr_sect, buf))
== NULL) {
ERR_clear_error();
value = NULL;
}
- (void) snprintf(buf, sizeof buf, "%s_min", type);
+ snprintf(buf, sizeof buf, "%s_min", type);
if (!NCONF_get_number(req_conf, attr_sect, buf, &n_min)) {
ERR_clear_error();
n_min = -1;
}
- (void) snprintf(buf, sizeof buf, "%s_max", type);
+ snprintf(buf, sizeof buf, "%s_max", type);
if (!NCONF_get_number(req_conf, attr_sect, buf, &n_max)) {
ERR_clear_error();
n_max = -1;
goto end;
if (s_www_path != NULL) {
- (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
+ snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
SSL_write(scon, buf, strlen(buf));
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
goto end;
}
if (s_www_path != NULL) {
- (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
+ snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
SSL_write(scon, buf, strlen(buf));
while (SSL_read(scon, buf, sizeof(buf)) > 0);
}
goto end;
if (s_www_path) {
- (void) snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
+ snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
SSL_write(scon, buf, strlen(buf));
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
s->data = (unsigned char *)p;
}
- (void) snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900,
+ snprintf(p, len, "%04d%02d%02d%02d%02d%02dZ", ts->tm_year + 1900,
ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min, ts->tm_sec);
s->length = strlen(p);
s->type = V_ASN1_GENERALIZEDTIME;
if ((minsize > 0) && (nchar < minsize)) {
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_SHORT);
- (void) snprintf(strbuf, sizeof strbuf, "%ld", minsize);
+ snprintf(strbuf, sizeof strbuf, "%ld", minsize);
ERR_add_error_data(2, "minsize=", strbuf);
return -1;
}
if ((maxsize > 0) && (nchar > maxsize)) {
ASN1err(ASN1_F_ASN1_MBSTRING_NCOPY, ASN1_R_STRING_TOO_LONG);
- (void) snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
+ snprintf(strbuf, sizeof strbuf, "%ld", maxsize);
ERR_add_error_data(2, "maxsize=", strbuf);
return -1;
}
if(c > 0xffffffffL)
return -1;
if(c > 0xffff) {
- (void) snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
+ snprintf(tmphex, sizeof tmphex, "\\W%08lX", c);
if(!io_ch(arg, tmphex, 10)) return -1;
return 10;
}
if(c > 0xff) {
- (void) snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
+ snprintf(tmphex, sizeof tmphex, "\\U%04lX", c);
if(!io_ch(arg, tmphex, 6)) return -1;
return 6;
}
return 2;
}
if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) {
- (void) snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp);
+ snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp);
if(!io_ch(arg, tmphex, 3)) return -1;
return 3;
}
s->data=(unsigned char *)p;
}
- (void) snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
+ snprintf(p,len,"%02d%02d%02d%02d%02d%02dZ",ts->tm_year%100,
ts->tm_mon+1,ts->tm_mday,ts->tm_hour,ts->tm_min,ts->tm_sec);
s->length=strlen(p);
s->type=V_ASN1_UTCTIME;
{
char buf1[DECIMAL_SIZE(address) + 1], buf2[DECIMAL_SIZE(offset) + 1];
- (void) snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address);
- (void) snprintf(buf2, sizeof buf2, "%d", offset);
+ snprintf(buf1, sizeof buf1, "%lu", (unsigned long)address);
+ snprintf(buf2, sizeof buf2, "%d", offset);
ERR_add_error_data(4, "address=", buf1, " offset=", buf2);
}
p = str;
if ((xclass & V_ASN1_PRIVATE) == V_ASN1_PRIVATE)
- (void) snprintf(str, sizeof str, "priv [ %d ] ", tag);
+ snprintf(str, sizeof str, "priv [ %d ] ", tag);
else if ((xclass & V_ASN1_CONTEXT_SPECIFIC) == V_ASN1_CONTEXT_SPECIFIC)
- (void) snprintf(str, sizeof str, "cont [ %d ]", tag);
+ snprintf(str, sizeof str, "cont [ %d ]", tag);
else if ((xclass & V_ASN1_APPLICATION) == V_ASN1_APPLICATION)
- (void) snprintf(str, sizeof str, "appl [ %d ]", tag);
+ snprintf(str, sizeof str, "appl [ %d ]", tag);
else if (tag > 30)
- (void) snprintf(str, sizeof str, "<ASN1 %d>", tag);
+ snprintf(str, sizeof str, "<ASN1 %d>", tag);
else
p = ASN1_tag2str(tag);
for (i = 0; i < rows; i++) {
buf[0] = '\0'; /* start with empty string */
strlcpy(buf, str, sizeof buf);
- (void) snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
+ snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width);
strlcat(buf, tmp, sizeof buf);
for (j = 0; j < dump_width; j++) {
if (((i*dump_width) + j) >= len) {
strlcat(buf, " ", sizeof buf);
} else {
ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff;
- (void) snprintf(tmp, sizeof tmp, "%02x%c", ch,
+ snprintf(tmp, sizeof tmp, "%02x%c", ch,
j == 7 ? '-' : ' ');
strlcat(buf, tmp, sizeof buf);
}
if (((i*dump_width) + j) >= len)
break;
ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff;
- (void) snprintf(tmp, sizeof tmp, "%c",
+ snprintf(tmp, sizeof tmp, "%c",
((ch >= ' ') && (ch <= '~')) ? ch : '.');
strlcat(buf, tmp, sizeof buf);
}
}
#ifdef TRUNCATE
if (trc > 0) {
- (void) snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n",
+ snprintf(buf, sizeof buf, "%s%04x - <SPACES/NULS>\n",
str, len + trc);
ret += cb((void *)buf, strlen(buf), u);
}
goto end;
}
*addr = p;
- (void) snprintf(*addr, nl, "%s:%s", h, s);
+ snprintf(*addr, nl, "%s:%s", h, s);
goto end;
} while (0);
#endif
}
*addr = p;
}
- (void) snprintf(*addr, 24, "%d.%d.%d.%d:%d",
+ snprintf(*addr, 24, "%d.%d.%d.%d:%d",
(unsigned char)(l >> 24L) & 0xff, (unsigned char)(l >> 16L) & 0xff,
(unsigned char)(l >> 8L) & 0xff, (unsigned char)(l) & 0xff, port);
if (BIO_CB_RETURN & cmd)
r = ret;
- (void) snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
+ snprintf(buf, sizeof buf, "BIO[%08lX]:", (unsigned long)bio);
p = &(buf[14]);
p_maxlen = sizeof buf - 14;
switch (cmd) {
case BIO_CB_FREE:
- (void) snprintf(p, p_maxlen, "Free - %s\n", bio->method->name);
+ snprintf(p, p_maxlen, "Free - %s\n", bio->method->name);
break;
case BIO_CB_READ:
if (bio->method->type & BIO_TYPE_DESCRIPTOR)
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"read(%d,%lu) - %s fd=%d\n",
bio->num, (unsigned long)argi,
bio->method->name, bio->num);
else
- (void) snprintf(p, p_maxlen, "read(%d,%lu) - %s\n",
+ snprintf(p, p_maxlen, "read(%d,%lu) - %s\n",
bio->num, (unsigned long)argi, bio->method->name);
break;
case BIO_CB_WRITE:
if (bio->method->type & BIO_TYPE_DESCRIPTOR)
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"write(%d,%lu) - %s fd=%d\n",
bio->num, (unsigned long)argi,
bio->method->name, bio->num);
else
- (void) snprintf(p, p_maxlen, "write(%d,%lu) - %s\n",
+ snprintf(p, p_maxlen, "write(%d,%lu) - %s\n",
bio->num, (unsigned long)argi, bio->method->name);
break;
case BIO_CB_PUTS:
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"puts() - %s\n", bio->method->name);
break;
case BIO_CB_GETS:
- (void) snprintf(p, p_maxlen, "gets(%lu) - %s\n",
+ snprintf(p, p_maxlen, "gets(%lu) - %s\n",
(unsigned long)argi, bio->method->name);
break;
case BIO_CB_CTRL:
- (void) snprintf(p, p_maxlen, "ctrl(%lu) - %s\n",
+ snprintf(p, p_maxlen, "ctrl(%lu) - %s\n",
(unsigned long)argi, bio->method->name);
break;
case BIO_CB_RETURN|BIO_CB_READ:
- (void) snprintf(p, p_maxlen, "read return %ld\n", ret);
+ snprintf(p, p_maxlen, "read return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_WRITE:
- (void) snprintf(p, p_maxlen, "write return %ld\n", ret);
+ snprintf(p, p_maxlen, "write return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_GETS:
- (void) snprintf(p, p_maxlen, "gets return %ld\n", ret);
+ snprintf(p, p_maxlen, "gets return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_PUTS:
- (void) snprintf(p, p_maxlen, "puts return %ld\n", ret);
+ snprintf(p, p_maxlen, "puts return %ld\n", ret);
break;
case BIO_CB_RETURN|BIO_CB_CTRL:
- (void) snprintf(p, p_maxlen, "ctrl return %ld\n", ret);
+ snprintf(p, p_maxlen, "ctrl return %ld\n", ret);
break;
default:
- (void) snprintf(p, p_maxlen,
+ snprintf(p, p_maxlen,
"bio callback - unknown type (%d)\n", cmd);
break;
}
char buf[16];
unsigned char *p = ptr;
- (void) snprintf(buf, sizeof buf, "%d.%d.%d.%d",
+ snprintf(buf, sizeof buf, "%d.%d.%d.%d",
p[0], p[1], p[2], p[3]);
if (data->param_hostname != NULL)
free(data->param_hostname);
} else if (num == 3) {
char buf[DECIMAL_SIZE(int) + 1];
- (void) snprintf(buf, sizeof buf, "%d",
+ snprintf(buf, sizeof buf, "%d",
*(int *)ptr);
if (data->param_port != NULL)
free(data->param_port);
/* We now have a series of blocks, BN_DEC_NUM chars
* in length, where the last one needs truncation.
* The blocks need to be reversed in order. */
- (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
+ snprintf(p,BUF_REMAIN,BN_DEC_FMT1,*lp);
while (*p) p++;
while (lp != bn_data)
{
lp--;
- (void) snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
+ snprintf(p,BUF_REMAIN,BN_DEC_FMT2,*lp);
while (*p) p++;
}
}
{
init++;
#ifdef BN_LLONG
- (void) snprintf(data,sizeof data,"bn(%d,%d)",
+ snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULLONG)*8,(int)sizeof(BN_ULONG)*8);
#else
- (void) snprintf(data,sizeof data,"bn(%d,%d)",
+ snprintf(data,sizeof data,"bn(%d,%d)",
(int)sizeof(BN_ULONG)*8,(int)sizeof(BN_ULONG)*8);
#endif
}
if (buff != NULL) BUF_MEM_free(buff);
if (section != NULL) free(section);
if (line != NULL) *line=eline;
- (void) snprintf(btmp,sizeof btmp,"%ld",eline);
+ snprintf(btmp,sizeof btmp,"%ld",eline);
ERR_add_error_data(2,"line ",btmp);
if ((h != conf->data) && (conf->data != NULL))
{
{
char rcode[DECIMAL_SIZE(ret)+1];
CONFerr(CONF_F_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
- (void) snprintf(rcode, sizeof rcode, "%-8d", ret);
+ snprintf(rcode, sizeof rcode, "%-8d", ret);
ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
}
}
#ifdef DATE
static char buf[sizeof(DATE) + 11];
- (void) snprintf(buf, sizeof buf, "built on: %s", DATE);
+ snprintf(buf, sizeof buf, "built on: %s", DATE);
return (buf);
#else
return("built on: date not available");
#ifdef CFLAGS
static char buf[sizeof(CFLAGS) + 11];
- (void) snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
+ snprintf(buf, sizeof buf, "compiler: %s", CFLAGS);
return (buf);
#else
return("compiler: information not available");
#ifdef PLATFORM
static char buf[sizeof(PLATFORM) + 11];
- (void) snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
+ snprintf(buf, sizeof buf, "platform: %s", PLATFORM);
return (buf);
#else
return("platform: information not available");
size="int";
else
size="long";
- (void) snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
+ snprintf(buf,sizeof buf,"des(%s,%s,%s,%s)",ptr,risc,unroll,
size);
init=0;
}
#endif
/* Generate a nice engine name with available features */
- (void) snprintf(padlock_name, sizeof(padlock_name),
+ snprintf(padlock_name, sizeof(padlock_name),
"VIA PadLock (%s, %s)",
padlock_use_rng ? "RNG" : "no-RNG",
padlock_use_ace ? "ACE" : "no-ACE");
rs=ERR_reason_error_string(e);
if (ls == NULL)
- (void) snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
+ snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l);
if (fs == NULL)
- (void) snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
+ snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f);
if (rs == NULL)
- (void) snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
+ snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r);
- (void) snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
+ snprintf(buf, len,"error:%08lX:%s:%s:%s", e, ls?ls:lsbuf,
fs?fs:fsbuf, rs?rs:rsbuf);
if (strlen(buf) == len-1)
{
while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)
{
ERR_error_string_n(l, buf, sizeof buf);
- (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
+ snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, buf,
file, line, (flags & ERR_TXT_STRING) ? data : "");
if (cb(buf2, strlen(buf2), u) <= 0)
break; /* abort outputting the error report */
}
else
{
- (void) snprintf(tbuf,sizeof tbuf,".%lu",l);
+ snprintf(tbuf,sizeof tbuf,".%lu",l);
i=strlen(tbuf);
if (buf && (buf_len > 0))
{
(char *)kstr, klen,
cb, u);
- (void) snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
+ snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str);
return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey,
pem_str,bp,x,enc,kstr,klen,cb,u);
}
if (!x->ameth || !x->ameth->param_encode)
return 0;
- (void) snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
+ snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str);
return PEM_ASN1_write_bio(
(i2d_of_void *)x->ameth->param_encode,
pem_str,bp,x,NULL,NULL,0,0,NULL);
if the elements correspond to 0, they MUST be wholly
omitted, and the decimal point element also MUST be
omitted." */
- (void)snprintf(usecstr, sizeof(usecstr), ".%06ld", usec);
+ snprintf(usecstr, sizeof(usecstr), ".%06ld", usec);
/* truncate and trim trailing 0 */
usecstr[precision + 1] = '\0';
p = usecstr + strlen(usecstr) - 1;
char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1];
char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1];
- (void) snprintf(number1, sizeof(number1), "%d",
+ snprintf(number1, sizeof(number1), "%d",
uis->_.string_data.result_minsize);
- (void) snprintf(number2, sizeof(number2), "%d",
+ snprintf(number2, sizeof(number2), "%d",
uis->_.string_data.result_maxsize);
if (l < uis->_.string_data.result_minsize) {
hent = NULL;
}
for (;;) {
- (void) snprintf(b->data, b->max, "%s/%08lx.%s%d",
+ snprintf(b->data, b->max, "%s/%08lx.%s%d",
ent->dir, h, postfix, k);
#ifndef OPENSSL_NO_POSIX_IO
return("CRL path validation error");
default:
- (void) snprintf(buf,sizeof buf,"error number %ld",n);
+ snprintf(buf,sizeof buf,"error number %ld",n);
return(buf);
}
}
case GEN_IPADD:
p = gen->d.ip->data;
if(gen->d.ip->length == 4)
- (void) snprintf(oline, sizeof oline,
+ snprintf(oline, sizeof oline,
"%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
else if(gen->d.ip->length == 16)
{
oline[0] = 0;
for (i = 0; i < 8; i++)
{
- (void) snprintf(htmp, sizeof htmp,
+ snprintf(htmp, sizeof htmp,
"%X", p[0] << 8 | p[1]);
p += 2;
strlcat(oline, htmp, sizeof(oline));