Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-42

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • 0.2
    • None
    • None
    • None
    • latest from git, Fedora 14, x86_64
    • Fully Compatible

    Description

      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:

      Attachments

        Activity

          People

            kbanker Kyle Banker
            meyering Jim Meyering
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: