diff options
author | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
commit | d8ac4091605cafeed429956439b3365036470356 (patch) | |
tree | 86f85152c10afe3de06afc06d7738c614a3210cb /gnu | |
parent | 2d831c7d21d4e39820d9fe862e7ec818476c083b (diff) | |
download | FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.zip FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.tar.gz |
Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.
PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/as/config/atof-ieee.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/ld/rtld/rtld.c | 4 | ||||
-rw-r--r-- | gnu/usr.bin/man/man/man.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/gnu/usr.bin/as/config/atof-ieee.c b/gnu/usr.bin/as/config/atof-ieee.c index 5fa3a44..da9d730 100644 --- a/gnu/usr.bin/as/config/atof-ieee.c +++ b/gnu/usr.bin/as/config/atof-ieee.c @@ -18,7 +18,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef lint -static char rcsid[] = "$Id$"; +static char rcsid[] = "$Id: atof-ieee.c,v 1.7 1997/02/22 15:44:21 peter Exp $"; #endif #include "as.h" @@ -174,7 +174,7 @@ LITTLENUM_TYPE *words; /* Build the binary here. */ generic_floating_point_number.low = bits + MAX_PRECISION; generic_floating_point_number.high = NULL; generic_floating_point_number.leader = NULL; - generic_floating_point_number.exponent = NULL; + generic_floating_point_number.exponent = 0; generic_floating_point_number.sign = '\0'; /* Use more LittleNums than seems */ diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c index 452e6ff..e3debe5 100644 --- a/gnu/usr.bin/ld/rtld/rtld.c +++ b/gnu/usr.bin/ld/rtld/rtld.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: rtld.c,v 1.47 1997/08/02 04:56:44 jdp Exp $ + * $Id: rtld.c,v 1.48 1997/08/19 23:33:45 nate Exp $ */ #include <sys/param.h> @@ -2117,7 +2117,7 @@ struct env_scan_tab { L("LD_BIND_NOW=", 0, &ld_bind_now) L("LD_SUPPRESS_WARNINGS=", 0, &ld_suppress_warnings) L("LD_WARN_NON_PURE_CODE=", 0, &ld_warn_non_pure_code) - { NULL, 0, NULL } + { NULL, 0, 0, NULL } }; #undef L diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index 4452fc4..d463f65 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -468,7 +468,7 @@ is_section (name) register char **vs; for (vs = section_list; *vs != NULL; vs++) - if ((strcmp (*vs, name) == NULL) + if ((strcmp (*vs, name) == 0) || (isdigit (name[0]) && strlen(name) == 1)) return strdup (name); @@ -557,7 +557,7 @@ convert_name (name, to_cat) t1 = strrchr (to_name, '/'); if (t1 != NULL) { - *t1 = NULL; + *t1 = '\0'; t2 = strrchr (to_name, '/'); *t1 = '/'; } |