X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=inline;f=examples%2Fvm_power_manager%2Fvm_power_cli.c;h=c5e8d9348b2c0984d518ba37f28cd460a1368ebf;hb=35050da740f0a031fb2c550f367d14db30ca8b9a;hp=e7f4469170905b44ba9cacaf5a0a4c9e2e919875;hpb=3842bf2424e27d4092fafcab000e10935c5d47f3;p=dpdk.git diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c index e7f4469170..c5e8d9348b 100644 --- a/examples/vm_power_manager/vm_power_cli.c +++ b/examples/vm_power_manager/vm_power_cli.c @@ -45,7 +45,6 @@ #include #include #include -#include #include "vm_power_cli.h" #include "channel_manager.h" @@ -323,7 +322,7 @@ cmd_channels_op_parsed(void *parsed_result, struct cmdline *cl, break; errno = 0; channel_num = (unsigned)strtol(token, &tail_ptr, 10); - if ((errno != 0) || (*tail_ptr != '\0') || tail_ptr == NULL) + if ((errno != 0) || tail_ptr == NULL || (*tail_ptr != '\0')) break; if (channel_num == CHANNEL_CMDS_MAX_VM_CHANNELS) { @@ -408,7 +407,7 @@ cmd_channels_status_op_parsed(void *parsed_result, struct cmdline *cl, break; errno = 0; channel_num = (unsigned)strtol(token, &tail_ptr, 10); - if ((errno != 0) || (*tail_ptr != '\0') || tail_ptr == NULL) + if ((errno != 0) || tail_ptr == NULL || (*tail_ptr != '\0')) break; if (channel_num == CHANNEL_CMDS_MAX_VM_CHANNELS) { @@ -624,7 +623,7 @@ cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl, cmdline_parse_token_string_t cmd_set_cpu_freq = TOKEN_STRING_INITIALIZER(struct cmd_set_cpu_freq_result, set_cpu_freq, "set_cpu_freq"); -cmdline_parse_token_string_t cmd_set_cpu_freq_core_num = +cmdline_parse_token_num_t cmd_set_cpu_freq_core_num = TOKEN_NUM_INITIALIZER(struct cmd_set_cpu_freq_result, core_num, UINT8); cmdline_parse_token_string_t cmd_set_cpu_freq_cmd_cmd =