mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
Reformat netbiosns.c using astylerc
This commit is contained in:
parent
be5bcc172d
commit
52d65ed1d0
@ -123,8 +123,7 @@ PACK_STRUCT_END
|
||||
# include "arch/bpstruct.h"
|
||||
#endif
|
||||
PACK_STRUCT_BEGIN
|
||||
struct netbios_resp
|
||||
{
|
||||
struct netbios_resp {
|
||||
struct netbios_hdr resp_hdr;
|
||||
struct netbios_name_hdr resp_name;
|
||||
} PACK_STRUCT_STRUCT;
|
||||
@ -159,10 +158,12 @@ netbiosns_name_decode(char *name_enc, char *name_dec, int name_dec_len)
|
||||
/* Every two characters of the first level-encoded name
|
||||
* turn into one character in the decoded name. */
|
||||
cname = *pname;
|
||||
if (cname == '\0')
|
||||
if (cname == '\0') {
|
||||
break; /* no more characters */
|
||||
if (cname == '.')
|
||||
}
|
||||
if (cname == '.') {
|
||||
break; /* scope ID follows */
|
||||
}
|
||||
if (cname < 'A' || cname > 'Z') {
|
||||
/* Not legal. */
|
||||
return -1;
|
||||
@ -213,10 +214,12 @@ netbiosns_name_encode(char *name_enc, char *name_dec, int name_dec_len)
|
||||
/* Every two characters of the first level-encoded name
|
||||
* turn into one character in the decoded name. */
|
||||
cname = *pname;
|
||||
if (cname == '\0')
|
||||
if (cname == '\0') {
|
||||
break; /* no more characters */
|
||||
if (cname == '.')
|
||||
}
|
||||
if (cname == '.') {
|
||||
break; /* scope ID follows */
|
||||
}
|
||||
if ((cname < 'A' || cname > 'Z') && (cname < '0' || cname > '9')) {
|
||||
/* Not legal. */
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user