MOD aaa-12 去掉返错字符串的换行符
SOL 去掉返错字符串的换行符 修改人:zhangliang 检视人:zhangliang
This commit is contained in:
parent
60f9e19435
commit
7f08226b43
|
@ -36,7 +36,7 @@ typedef enum {
|
|||
RET_NOTSUPPORT = 11,
|
||||
RET_INPUTERR = 12,
|
||||
RET_IPINVALID = 13,
|
||||
RET_BR_INVALID = 14,
|
||||
RET_NAMEINVAL = 14,
|
||||
RET_EXIST = 15,
|
||||
RET_FULL = 16
|
||||
} ret_code;
|
||||
|
@ -57,7 +57,7 @@ typedef enum {
|
|||
{ RET_NOTSUPPORT, "NotSupport"},\
|
||||
{ RET_INPUTERR, "InputError"},\
|
||||
{ RET_IPINVALID, "IpInvalid"},\
|
||||
{ RET_BR_INVALID, "BrNameInvalid"},\
|
||||
{ RET_NAMEINVAL, "NameInvalid"},\
|
||||
{ RET_EXIST, "AlreadyExist"},\
|
||||
{ RET_FULL, "FULL"}\
|
||||
}
|
||||
|
|
|
@ -106,13 +106,13 @@ do { \
|
|||
do { \
|
||||
if(ret == RET_SYSERR)\
|
||||
{\
|
||||
sprintf(buff, "%s\n", strerror(errno));\
|
||||
sprintf(buff, "%s", strerror(errno));\
|
||||
(buff_size) = strlen(buff);\
|
||||
(buff_size)++;\
|
||||
}\
|
||||
else if(ret != RET_OK)\
|
||||
{\
|
||||
sprintf(buff, "%s\n", rpc_code_format(ret));\
|
||||
sprintf(buff, "%s", rpc_code_format(ret));\
|
||||
(buff_size) = strlen(buff);\
|
||||
(buff_size)++;\
|
||||
}\
|
||||
|
|
|
@ -122,11 +122,11 @@ ret_code br_name_chk(char *br_name)
|
|||
|| strlen(br_name) > BR_NAMSIZ - 1
|
||||
|| strstr(br_name, "br-vl") != NULL)
|
||||
{
|
||||
return RET_BR_INVALID;
|
||||
return RET_NAMEINVAL;
|
||||
}
|
||||
if(br_name[0] != 'b' || br_name[1] != 'r')
|
||||
{
|
||||
return RET_BR_INVALID;
|
||||
return RET_NAMEINVAL;
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
|
|
Loading…
Reference in New Issue