~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/result.c

  • Committer: Monty Taylor
  • Date: 2010-12-12 11:52:00 UTC
  • mto: (2023.3.15 innodb-cxx)
  • mto: This revision was merged to the branch mainline in revision 2014.
  • Revision ID: mordred@inaugust.com-20101212115200-uyk1h5crevvt77gh
RevertĀ -Wc++-compatĀ change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
{
51
51
  if (result == NULL)
52
52
  {
53
 
    result= (drizzle_result_st *)malloc(sizeof(drizzle_result_st));
 
53
    result= malloc(sizeof(drizzle_result_st));
54
54
    if (result == NULL)
55
55
    {
56
56
      drizzle_set_error(con->drizzle, "drizzle_result_create", "malloc");
247
247
 
248
248
    if (result->row_list_size < result->row_count)
249
249
    {
250
 
      row_list= (drizzle_row_t *)realloc(result->row_list,
251
 
                                         sizeof(drizzle_row_t) *
252
 
                                         ((size_t)(result->row_list_size) +
253
 
                                          DRIZZLE_ROW_GROW_SIZE));
 
250
      row_list= realloc(result->row_list, sizeof(drizzle_row_t) *
 
251
                        ((size_t)(result->row_list_size) +
 
252
                         DRIZZLE_ROW_GROW_SIZE));
254
253
      if (row_list == NULL)
255
254
      {
256
255
        drizzle_row_free(result, row);
261
260
 
262
261
      result->row_list= row_list;
263
262
 
264
 
      field_sizes_list= (size_t **)realloc(result->field_sizes_list,
265
 
                                           sizeof(size_t *) *
266
 
                                           ((size_t)(result->row_list_size) +
267
 
                                            DRIZZLE_ROW_GROW_SIZE));
 
263
      field_sizes_list= realloc(result->field_sizes_list, sizeof(size_t *) *
 
264
                                ((size_t)(result->row_list_size) +
 
265
                                 DRIZZLE_ROW_GROW_SIZE));
268
266
      if (field_sizes_list == NULL)
269
267
      {
270
268
        drizzle_row_free(result, row);
428
426
    /* We can ignore the returns since we've buffered the entire packet. */
429
427
    con->result->affected_rows= drizzle_unpack_length(con, &ret);
430
428
    con->result->insert_id= drizzle_unpack_length(con, &ret);
431
 
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr);
 
429
    con->status= drizzle_get_byte2(con->buffer_ptr);
432
430
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 2);
433
431
    con->buffer_ptr+= 4;
434
432
    con->buffer_size-= 5;
446
444
  {
447
445
    con->result->options= DRIZZLE_RESULT_EOF_PACKET;
448
446
    con->result->warning_count= drizzle_get_byte2(con->buffer_ptr + 1);
449
 
    con->status= (drizzle_con_status_t)drizzle_get_byte2(con->buffer_ptr + 3);
 
447
    con->status= drizzle_get_byte2(con->buffer_ptr + 3);
450
448
    con->buffer_ptr+= 5;
451
449
    con->buffer_size-= 5;
452
450
    con->packet_size-= 5;