mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-11-29 18:37:36 +08:00
Optimize some code
This commit is contained in:
parent
e7177a37a0
commit
3a1f8d5616
@ -1386,7 +1386,7 @@ ecb_binary32_to_binary16 (uint32_t x)
|
||||
|
||||
m = frexp (x, &e) * 0x20000000000000U;
|
||||
|
||||
r = m & 0x8000000000000000;;
|
||||
r = m & 0x8000000000000000;
|
||||
|
||||
if (r)
|
||||
m = -m;
|
||||
|
@ -80,7 +80,7 @@ static void get_current_time_str(GString *str) {
|
||||
}
|
||||
|
||||
static struct rfifo *rfifo_alloc(guint size) {
|
||||
struct rfifo *ret = (struct rfifo *)g_malloc0(sizeof(struct rfifo));;
|
||||
struct rfifo *ret = (struct rfifo *)g_malloc0(sizeof(struct rfifo));
|
||||
|
||||
if (!ret) {
|
||||
return NULL;
|
||||
|
@ -990,10 +990,8 @@ main_cmdline(int argc, char **argv)
|
||||
opts = chassis_options_new();
|
||||
opts->ignore_unknown = TRUE;
|
||||
srv->options = opts;
|
||||
srv->argv = argv;
|
||||
srv->argc = argc;
|
||||
|
||||
srv->argv = g_new0(char *, argc + 1);
|
||||
srv->argv = g_new0(char *, argc);
|
||||
int i;
|
||||
for (i = 0; i < argc; i++) {
|
||||
srv->argv[i] = g_strdup(argv[i]);
|
||||
|
@ -3899,7 +3899,7 @@ network_mysqld_process_select_resp(network_mysqld_con *con, network_socket *serv
|
||||
} else {
|
||||
network_queue *reserved_queue = con->client->send_queue;
|
||||
con->client->send_queue = server->recv_queue_raw;
|
||||
server->recv_queue_raw = server->recv_queue;;
|
||||
server->recv_queue_raw = server->recv_queue;
|
||||
server->recv_queue = reserved_queue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user