1. 22 8月, 2014 6 次提交
    • Travis Cross's avatar
      Refactor to avoid warning about realloc usage · 164fa133
      Travis Cross 提交于
      Clang's static analyzer noticed the result of realloc was being
      assigned to a pointer of a different type than was used to calculate
      the new size.  We can make things simpler and more idiomatic here by
      using the correct pointer type and letting C's pointer arithmetic
      automatically handle some multiplication.
      
      We also use the distributive property here to simplify the calculation
      for memset.
      164fa133
    • Travis Cross's avatar
      Remove dead assignments in `switch.c` · 2cf6fd72
      Travis Cross 提交于
      2cf6fd72
    • Travis Cross's avatar
      Handle null argv in `switch.c` · 4f81e594
      Travis Cross 提交于
      4f81e594
    • Travis Cross's avatar
      Remove dead assignment · e2d67d4e
      Travis Cross 提交于
      e2d67d4e
    • Travis Cross's avatar
      Avoid using undefined memory in `switch_fulldate_cmp` · b5a87aea
      Travis Cross 提交于
      The `switch_split_date` and `switch_split_time` functions only set as
      many variables as they believe exist values in the input string.
      Since we didn't have defaults assigned we would read undefined stack
      memory if the input string didn't contain e.g. an hour.
      
      With this commit, we use 1970 if no year is present, January if no
      month is present, the first day of the month if none is given, and
      zero for each of a missing hour, minute, or second.
      b5a87aea
    • Travis Cross's avatar
      Refactor `switch_fulldate_cmp` · bf42dd65
      Travis Cross 提交于
      We're moving the variable declarations down to the smallest possible
      scope (a good idea in general) so we can address the use of undefined
      memory by the function in a later commit.
      bf42dd65
  2. 21 8月, 2014 5 次提交
  3. 20 8月, 2014 3 次提交
  4. 19 8月, 2014 2 次提交
  5. 18 8月, 2014 4 次提交
  6. 17 8月, 2014 1 次提交
  7. 16 8月, 2014 2 次提交
  8. 15 8月, 2014 6 次提交
  9. 14 8月, 2014 3 次提交
  10. 13 8月, 2014 6 次提交
  11. 12 8月, 2014 2 次提交