6942780 mac_add_name() has typo
authorPrakash Jalan <Prakash.Jalan@Sun.COM>
Thu, 15 Apr 2010 18:43:44 -0700
changeset 12169 b5c6274610de
parent 12168 f38263bc3ed1
child 12170 1eb0a8fe1e90
6942780 mac_add_name() has typo 6942832 uninitialized variable in mac_ndd_get_ioctl()
usr/src/uts/common/io/mac/mac_ndd.c
--- a/usr/src/uts/common/io/mac/mac_ndd.c	Fri Apr 16 08:02:24 2010 +0800
+++ b/usr/src/uts/common/io/mac/mac_ndd.c	Thu Apr 15 18:43:44 2010 -0700
@@ -19,8 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 /*
@@ -75,7 +74,7 @@
 	if (mp->b_wptr + len >= mp->b_datap->db_lim) {
 		mp->b_cont = allocb(len, BPRI_HI);
 		mp = mp->b_cont;
-		if (mp != NULL)
+		if (mp == NULL)
 			return (B_FALSE);
 	}
 	cp = (char *)mp->b_wptr;
@@ -187,7 +186,7 @@
 	char		*valp;
 	uchar_t 	*value;
 	uint32_t	new_value;
-	int		size_out, i;
+	int		size_out = 0, i;
 	int		status = EINVAL;
 	char		*name, priv_name[MAXLINKPROPNAME];
 	uint8_t		u8;