2011-08-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index". * libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy".
This commit is contained in:
		
							parent
							
								
									da344d0ea9
								
							
						
					
					
						commit
						1c5c40f638
					
				|  | @ -1,3 +1,8 @@ | |||
| 2011-08-23  Ralf Corsépius  <ralf.corsepius@rtems.org> | ||||
| 
 | ||||
| 	* libc/stdlib/putenv_r.c: Use "strchr" instead of obsolete "index". | ||||
| 	* libc/stdlib/setenv_r.c: Use "memcpy" instead of obsolete "bcopy". | ||||
| 
 | ||||
| 2011-08-23  Ralf Corsépius  <ralf.corsepius@rtems.org> | ||||
| 
 | ||||
| 	* libc/misc/ffs.c, libc/string/bcmp.c, libc/string/bcopy.c, | ||||
|  |  | |||
|  | @ -43,7 +43,7 @@ _DEFUN (_putenv_r, (reent_ptr, str), | |||
|   if (!p) | ||||
|     return 1; | ||||
| 
 | ||||
|   if (!(equal = index (p, '='))) | ||||
|   if (!(equal = strchr (p, '='))) | ||||
|     { | ||||
|       (void) _free_r (reent_ptr, p); | ||||
|       return 1; | ||||
|  |  | |||
|  | @ -110,7 +110,7 @@ _DEFUN (_setenv_r, (reent_ptr, name, value, rewrite), | |||
|               ENV_UNLOCK; | ||||
| 	      return (-1); | ||||
|             } | ||||
| 	  bcopy ((char *) *p_environ, (char *) P, cnt * sizeof (char *)); | ||||
| 	  memcpy((char *) P,(char *) *p_environ, cnt * sizeof (char *)); | ||||
| 	  *p_environ = P; | ||||
| 	} | ||||
|       (*p_environ)[cnt + 1] = NULL; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue