diff options
| author | beck <> | 2014-04-15 16:22:30 +0000 |
|---|---|---|
| committer | beck <> | 2014-04-15 16:22:30 +0000 |
| commit | 4e5cf8d1c0be703d2956348c807ab6ac39172547 (patch) | |
| tree | 9cf9333a1b1e8a5fc8ba42ab0988acfc5766ddfa | |
| parent | 815e93e74514b0f699488f372d491cf84236cd99 (diff) | |
| download | openbsd-4e5cf8d1c0be703d2956348c807ab6ac39172547.tar.gz openbsd-4e5cf8d1c0be703d2956348c807ab6ac39172547.tar.bz2 openbsd-4e5cf8d1c0be703d2956348c807ab6ac39172547.zip | |
Convert some BIO_snprintf() to (void) snprintf - as although these ones
save the return value, the value is actually ignored.
ok deraadt@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/src/apps/apps.c | 80 |
1 files changed, 12 insertions, 68 deletions
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index b517c47692..4ec99601cf 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
| @@ -1664,13 +1664,7 @@ int save_serial(char *serialfile, char *suffix, BIGNUM *serial, ASN1_INTEGER **r | |||
| 1664 | if (suffix == NULL) | 1664 | if (suffix == NULL) |
| 1665 | BUF_strlcpy(buf[0], serialfile, BSIZE); | 1665 | BUF_strlcpy(buf[0], serialfile, BSIZE); |
| 1666 | else | 1666 | else |
| 1667 | { | 1667 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix); |
| 1668 | #ifndef OPENSSL_SYS_VMS | ||
| 1669 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", serialfile, suffix); | ||
| 1670 | #else | ||
| 1671 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", serialfile, suffix); | ||
| 1672 | #endif | ||
| 1673 | } | ||
| 1674 | #ifdef RL_DEBUG | 1668 | #ifdef RL_DEBUG |
| 1675 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); | 1669 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); |
| 1676 | #endif | 1670 | #endif |
| @@ -1719,20 +1713,10 @@ int rotate_serial(char *serialfile, char *new_suffix, char *old_suffix) | |||
| 1719 | goto err; | 1713 | goto err; |
| 1720 | } | 1714 | } |
| 1721 | 1715 | ||
| 1722 | #ifndef OPENSSL_SYS_VMS | 1716 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", |
| 1723 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", | ||
| 1724 | serialfile, new_suffix); | 1717 | serialfile, new_suffix); |
| 1725 | #else | 1718 | (void) snprintf(buf[1], sizeof buf[1], "%s.%s", |
| 1726 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", | ||
| 1727 | serialfile, new_suffix); | ||
| 1728 | #endif | ||
| 1729 | #ifndef OPENSSL_SYS_VMS | ||
| 1730 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s", | ||
| 1731 | serialfile, old_suffix); | ||
| 1732 | #else | ||
| 1733 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s", | ||
| 1734 | serialfile, old_suffix); | 1719 | serialfile, old_suffix); |
| 1735 | #endif | ||
| 1736 | #ifdef RL_DEBUG | 1720 | #ifdef RL_DEBUG |
| 1737 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", | 1721 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", |
| 1738 | serialfile, buf[1]); | 1722 | serialfile, buf[1]); |
| @@ -1816,11 +1800,7 @@ CA_DB *load_index(char *dbfile, DB_ATTR *db_attr) | |||
| 1816 | if ((tmpdb = TXT_DB_read(in,DB_NUMBER)) == NULL) | 1800 | if ((tmpdb = TXT_DB_read(in,DB_NUMBER)) == NULL) |
| 1817 | goto err; | 1801 | goto err; |
| 1818 | 1802 | ||
| 1819 | #ifndef OPENSSL_SYS_VMS | 1803 | (void) snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile); |
| 1820 | BIO_snprintf(buf[0], sizeof buf[0], "%s.attr", dbfile); | ||
| 1821 | #else | ||
| 1822 | BIO_snprintf(buf[0], sizeof buf[0], "%s-attr", dbfile); | ||
| 1823 | #endif | ||
| 1824 | dbattr_conf = NCONF_new(NULL); | 1804 | dbattr_conf = NCONF_new(NULL); |
| 1825 | if (NCONF_load(dbattr_conf,buf[0],&errorline) <= 0) | 1805 | if (NCONF_load(dbattr_conf,buf[0],&errorline) <= 0) |
| 1826 | { | 1806 | { |
| @@ -1915,21 +1895,9 @@ int save_index(const char *dbfile, const char *suffix, CA_DB *db) | |||
| 1915 | goto err; | 1895 | goto err; |
| 1916 | } | 1896 | } |
| 1917 | 1897 | ||
| 1918 | #ifndef OPENSSL_SYS_VMS | 1898 | (void) snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile); |
| 1919 | j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr", dbfile); | 1899 | (void) snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix); |
| 1920 | #else | 1900 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix); |
| 1921 | j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr", dbfile); | ||
| 1922 | #endif | ||
| 1923 | #ifndef OPENSSL_SYS_VMS | ||
| 1924 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s.attr.%s", dbfile, suffix); | ||
| 1925 | #else | ||
| 1926 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s-attr-%s", dbfile, suffix); | ||
| 1927 | #endif | ||
| 1928 | #ifndef OPENSSL_SYS_VMS | ||
| 1929 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", dbfile, suffix); | ||
| 1930 | #else | ||
| 1931 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", dbfile, suffix); | ||
| 1932 | #endif | ||
| 1933 | #ifdef RL_DEBUG | 1901 | #ifdef RL_DEBUG |
| 1934 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); | 1902 | BIO_printf(bio_err, "DEBUG: writing \"%s\"\n", buf[0]); |
| 1935 | #endif | 1903 | #endif |
| @@ -1977,39 +1945,15 @@ int rotate_index(const char *dbfile, const char *new_suffix, const char *old_suf | |||
| 1977 | goto err; | 1945 | goto err; |
| 1978 | } | 1946 | } |
| 1979 | 1947 | ||
| 1980 | #ifndef OPENSSL_SYS_VMS | 1948 | (void) snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile); |
| 1981 | j = BIO_snprintf(buf[4], sizeof buf[4], "%s.attr", dbfile); | 1949 | (void) snprintf(buf[2], sizeof buf[2], "%s.attr.%s", |
| 1982 | #else | ||
| 1983 | j = BIO_snprintf(buf[4], sizeof buf[4], "%s-attr", dbfile); | ||
| 1984 | #endif | ||
| 1985 | #ifndef OPENSSL_SYS_VMS | ||
| 1986 | j = BIO_snprintf(buf[2], sizeof buf[2], "%s.attr.%s", | ||
| 1987 | dbfile, new_suffix); | ||
| 1988 | #else | ||
| 1989 | j = BIO_snprintf(buf[2], sizeof buf[2], "%s-attr-%s", | ||
| 1990 | dbfile, new_suffix); | ||
| 1991 | #endif | ||
| 1992 | #ifndef OPENSSL_SYS_VMS | ||
| 1993 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s.%s", | ||
| 1994 | dbfile, new_suffix); | 1950 | dbfile, new_suffix); |
| 1995 | #else | 1951 | (void) snprintf(buf[0], sizeof buf[0], "%s.%s", |
| 1996 | j = BIO_snprintf(buf[0], sizeof buf[0], "%s-%s", | ||
| 1997 | dbfile, new_suffix); | 1952 | dbfile, new_suffix); |
| 1998 | #endif | 1953 | (void) snprintf(buf[1], sizeof buf[1], "%s.%s", |
| 1999 | #ifndef OPENSSL_SYS_VMS | ||
| 2000 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s.%s", | ||
| 2001 | dbfile, old_suffix); | 1954 | dbfile, old_suffix); |
| 2002 | #else | 1955 | (void) snprintf(buf[3], sizeof buf[3], "%s.attr.%s", |
| 2003 | j = BIO_snprintf(buf[1], sizeof buf[1], "%s-%s", | ||
| 2004 | dbfile, old_suffix); | 1956 | dbfile, old_suffix); |
| 2005 | #endif | ||
| 2006 | #ifndef OPENSSL_SYS_VMS | ||
| 2007 | j = BIO_snprintf(buf[3], sizeof buf[3], "%s.attr.%s", | ||
| 2008 | dbfile, old_suffix); | ||
| 2009 | #else | ||
| 2010 | j = BIO_snprintf(buf[3], sizeof buf[3], "%s-attr-%s", | ||
| 2011 | dbfile, old_suffix); | ||
| 2012 | #endif | ||
| 2013 | #ifdef RL_DEBUG | 1957 | #ifdef RL_DEBUG |
| 2014 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", | 1958 | BIO_printf(bio_err, "DEBUG: renaming \"%s\" to \"%s\"\n", |
| 2015 | dbfile, buf[1]); | 1959 | dbfile, buf[1]); |
