~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/protocol.cc

  • Committer: Brian Aker
  • Date: 2008-11-26 21:37:50 UTC
  • Revision ID: brian@tangent.org-20081126213750-m96j23htwfymuwlt
Collection of dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
bool Protocol::net_store_data(const unsigned char *from, size_t length)
36
36
{
37
 
  ulong packet_length=packet->length();
 
37
  size_t packet_length= packet->length();
38
38
  /* 
39
39
     The +9 comes from that strings of length longer than 16M require
40
40
     9 bytes to be stored (see net_store_length).
44
44
    return 1;
45
45
  unsigned char *to= net_store_length((unsigned char*) packet->ptr()+packet_length, length);
46
46
  memcpy(to,from,length);
47
 
  packet->length((uint) (to+length-(unsigned char*) packet->ptr()));
 
47
  packet->length((size_t) (to+length-(unsigned char*) packet->ptr()));
48
48
  return 0;
49
49
}
50
50
 
88
88
            net_store_data((const unsigned char*) convert->ptr(), convert->length()));
89
89
  }
90
90
 
91
 
  ulong packet_length= packet->length();
92
 
  ulong new_length= packet_length + conv_length + 1;
 
91
  size_t packet_length= packet->length();
 
92
  size_t new_length= packet_length + conv_length + 1;
93
93
 
94
94
  if (new_length > packet->alloced_length() && packet->realloc(new_length))
95
95
    return 1;
304
304
    return packet+1;
305
305
  }
306
306
  *packet++=252;
307
 
  int2store(packet,(uint) length);
 
307
  int2store(packet,(uint32_t) length);
 
308
 
308
309
  return packet+2;
309
310
}
310
311