~linuxjedi/libdrizzle/5.1-optimize

« back to all changes in this revision

Viewing changes to libdrizzle/command.cc

  • Committer: Continuous Integration
  • Date: 2013-04-26 19:03:51 UTC
  • mfrom: (117.2.1 fix_clang_warnings)
  • Revision ID: ci@drizzle.org-20130426190351-86ussswok3mn0atd
Merge lp:~dshrews/libdrizzle/libdrizzle Build: jenkins-Libdrizzle-93

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
    /* Make sure we can fit the largest non-streaming packet, currently a
86
86
       DRIZZLE_COMMAND_CHANGE_USER command. */
87
87
 
88
 
    con->packet_size= 1  /* Command */
 
88
    con->packet_size= (uint32_t)(
 
89
                      1  /* Command */
89
90
                    + strlen(con->user) + 1
90
91
                    + 1  /* Scramble size */
91
92
                    + DRIZZLE_MAX_SCRAMBLE_SIZE
92
 
                    + strlen(con->db) + 1;
 
93
                    + strlen(con->db) + 1);
93
94
 
94
95
    /* Flush buffer if there is not enough room. */
95
96
    free_size= con->buffer_allocation - (size_t)(start - con->buffer);
121
122
    }
122
123
    else
123
124
    {
124
 
      con->packet_size= 1 + con->command_total;
 
125
      con->packet_size= (uint32_t)(1 + con->command_total);
125
126
      free_size-= 5;
126
127
 
127
128
      /* Copy as much of the data in as we can into the write buffer. */