]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR binutils/10792
authorAlan Modra <amodra@gmail.com>
Sun, 18 Oct 2009 23:11:35 +0000 (23:11 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 18 Oct 2009 23:11:35 +0000 (23:11 +0000)
* dlltool.c (dll_name_list_append): Declare variable at start
of block.
(dll_name_list_count, dll_name-list_print): Likewise.

binutils/ChangeLog
binutils/dlltool.c

index c3f5b01bb38226d978b70334441b06f25b4e7767..d09915990eee6692cce76bf7d5b0332c2334934b 100644 (file)
@@ -1,3 +1,10 @@
+2009-10-19  Jerker Bäck  <jerker.back@gmail.com>
+
+       PR binutils/10792
+       * dlltool.c (dll_name_list_append): Declare variable at start
+       of block.
+       (dll_name_list_count, dll_name-list_print): Likewise.
+
 2009-10-16  Doug Evans  <dje@sebabeach.org>
 
        * MAINTAINERS: Add myself as m32r maintainer.
index 759961e3d9cad3fe37ece539edaba6d99702a34d..585c780708e659ce21120dee263c0deed49be58a 100644 (file)
@@ -3192,13 +3192,15 @@ gen_lib_file (int delay)
 static void
 dll_name_list_append (dll_name_list_type * list, bfd_byte * data)
 {
+  dll_name_list_node_type * entry;
+
   /* Error checking.  */
   if (! list || ! list->tail)
     return;
 
   /* Allocate new node.  */
-  dll_name_list_node_type * entry =
-    (dll_name_list_node_type *) xmalloc (sizeof (dll_name_list_node_type));
+  entry = ((dll_name_list_node_type *)
+          xmalloc (sizeof (dll_name_list_node_type)));
 
   /* Initialize its values.  */
   entry->dllname = xstrdup ((char *) data);
@@ -3214,12 +3216,14 @@ dll_name_list_append (dll_name_list_type * list, bfd_byte * data)
 static int 
 dll_name_list_count (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+  int count = 0;
+
   /* Error checking.  */
   if (! list || ! list->head)
     return 0;
 
-  int count = 0;
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next)
     {
@@ -3234,11 +3238,13 @@ dll_name_list_count (dll_name_list_type * list)
 static void 
 dll_name_list_print (dll_name_list_type * list)
 {
+  dll_name_list_node_type * p;
+
   /* Error checking.  */
   if (! list || ! list->head)
     return;
 
-  dll_name_list_node_type * p = list->head;
+  p = list->head;
 
   while (p && p->next && p->next->dllname && *(p->next->dllname))
     {