~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_getopt.cc

  • Committer: Monty Taylor
  • Date: 2008-12-09 04:45:44 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081209044544-va4o2vmn3xuao22y
Added more return value checks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1031
1031
    if ((char*) (intptr_t) value)
1032
1032
    {
1033
1033
      free((*(char**) variable));
1034
 
      *((char**) variable)= strdup((char*) (intptr_t) value);
 
1034
      char *tmpptr= strdup((char *) (intptr_t) value);
 
1035
      if (tmpptr != NULL)
 
1036
        *((char**) variable)= tmpptr;
1035
1037
    }
1036
1038
    break;
1037
1039
  default: /* dummy default to avoid compiler warnings */