[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [master] loader: parseCmdLineIp* takes just the value as an argument now.



On 08/17/2010 09:58 PM, Chris Lumens wrote:
You shouldn't need to check for ip= at the start, right?  This and the
ipv6 version are only ever called with the value itself, which should be
everything after the equals sign.

@@ -876,15 +875,23 @@ static void parseCmdLineIp(struct loaderData_s * loaderData, char *argv)
   */
  static void parseCmdLineIpv6(struct loaderData_s * loaderData, char *argv)
  {
+    char *start;
+    /* if there's "ip=" at the beginning, jump past it */
+    if (!strncmp(argv, "ip=", 3)) {
+        start = argv + 3;
+    } else {
+        start = argv;
+    }
+

And regardless of the above, it's impossible to get into this function
with "ip=", since it's only called when "ipv6=" is a command line
option.

- Chris

You're right, there's no reason to do that. The second hunk is even more useless.

Ales


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]