ares_save_options: assignments instead of memcpy
authorDaniel Stenberg <daniel@haxx.se>
Tue, 5 Oct 2010 17:42:39 +0000 (19:42 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Oct 2010 17:42:39 +0000 (19:42 +0200)
ares_init.c

index c146f96..21229ad 100644 (file)
@@ -401,10 +401,7 @@ int ares_save_options(ares_channel channel, struct ares_options *options,
     if (!options->sortlist)
       return ARES_ENOMEM;
     for (i = 0; i < channel->nsort; i++)
-    {
-      memcpy(&(options->sortlist[i]), &(channel->sortlist[i]),
-             sizeof(struct apattern));
-    }
+      options->sortlist[i] = channel->sortlist[i];
   }
   options->nsort = channel->nsort;