~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to examples/sqlite_server.cc

  • Committer: Mark Atwood
  • Date: 2011-06-30 07:03:08 UTC
  • mto: This revision was merged to the branch mainline in revision 2358.
  • Revision ID: me@mark.atwood.name-20110630070308-4380q6dqkkqv92w2
fix cppcheck redundantIfDelete0 warnings.  It is safe to deallocate a NULL pointer

Show diffs side-by-side

added added

removed removed

Lines of Context:
258
258
  while (1)
259
259
  {
260
260
    drizzle_result_free(&(server->result));
261
 
    if (data != NULL)
262
 
      free(data);
 
261
    free(data);
263
262
 
264
263
    data= (uint8_t *)drizzle_con_command_buffer(&(server->con), &command, &total, &ret);
265
264
    if (ret == DRIZZLE_RETURN_LOST_CONNECTION ||
266
265
        (ret == DRIZZLE_RETURN_OK && command == DRIZZLE_COMMAND_QUIT))
267
266
    {
268
 
      if (data != NULL)
269
 
        free(data);
 
267
      free(data);
270
268
      return;
271
269
    }
272
270
    DRIZZLE_RETURN_CHECK(ret, "drizzle_con_command_buffer", &(server->drizzle))