1. 13
  1.  

  2. 2

    Not initializing mode seems dangerous, although it’s probably fine in main(), I guess?

    1. 2

      I initialized a char *mode at around 3:09, is that what you mean?

      You’re right that it would be dangerous! But clang would have assumed a type of int and complained when I tried to assign mode = optarg, so the compiler is looking out for us at least a little :)

      1. 4

        No, you did not initialize it.

        And yes it is dangerous, main() or not.

        1. 2

          oh, you’re right! s/declare/initialize in my brain.

          Yeah, a dangerous mistake.