| 96 | */ |
| 97 | |
| 98 | uchar *net_store_length(uchar *packet, ulonglong length) |
| 99 | { |
| 100 | if (length < (ulonglong) LL(251)) |
| 101 | { |
| 102 | *packet=(uchar) length; |
| 103 | return packet+1; |
| 104 | } |
| 105 | /* 251 is reserved for NULL */ |
| 106 | if (length < (ulonglong) LL(65536)) |
| 107 | { |
| 108 | *packet++=252; |
| 109 | int2store(packet,(uint) length); |
| 110 | return packet+2; |
| 111 | } |
| 112 | if (length < (ulonglong) LL(16777216)) |
| 113 | { |
| 114 | *packet++=253; |
| 115 | int3store(packet,(ulong) length); |
| 116 | return packet+3; |
| 117 | } |
| 118 | *packet++=254; |
| 119 | int8store(packet,length); |
| 120 | return packet+8; |
| 121 | } |
| 122 |
no outgoing calls
no test coverage detected