remove unnecessary test: if (p) free (p); -> free (p);

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Trivial - P5
    • 0.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      latest from git, Fedora 14, x86_64
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      There is no reason to ensure P is non-NULL before calling "free(P)".
      (unless you still target SunOS4

      • src/gridfs.c (gridfs_destroy): Remove 4 unneeded tests.
        There is no longer (since SunOS 4) any need to guard against
        free (NULL), so replace each "if (p) free (p);" with "free (p);".

      Patch attached:

            Assignee:
            Kyle Banker (Inactive)
            Reporter:
            Jim Meyering
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: