Small syntax fix
This commit is contained in:
parent
66d636d5a2
commit
e14923889f
@ -81,7 +81,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
|
|||||||
strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2);
|
strncat(fname,de->d_name,PATH_MAX-strlen(fname)-2);
|
||||||
|
|
||||||
if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) {
|
if ((strcasecmp(de->d_name+9,"pnt") == 0) && !ispoint) {
|
||||||
sscanf(de->d_name,"%04x%04x",&t_net,&t_node);
|
sscanf(de->d_name,"%04hx%04hx",&t_net,&t_node);
|
||||||
addr.net = t_net;
|
addr.net = t_net;
|
||||||
addr.node = t_node;
|
addr.node = t_node;
|
||||||
if ((rc = scan_dir(fn, fname, 1)))
|
if ((rc = scan_dir(fn, fname, 1)))
|
||||||
@ -103,10 +103,10 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
|
|||||||
(strcasecmp(de->d_name+8,".req") == 0) ||
|
(strcasecmp(de->d_name+8,".req") == 0) ||
|
||||||
(strcasecmp(de->d_name+8,".pol") == 0)) {
|
(strcasecmp(de->d_name+8,".pol") == 0)) {
|
||||||
if (ispoint) {
|
if (ispoint) {
|
||||||
sscanf(de->d_name,"%08x", &t_point);
|
sscanf(de->d_name,"%08hx", &t_point);
|
||||||
addr.point = t_point;
|
addr.point = t_point;
|
||||||
} else {
|
} else {
|
||||||
sscanf(de->d_name,"%04x%04x", &t_net,&t_node);
|
sscanf(de->d_name,"%04hx%04hx", &t_net,&t_node);
|
||||||
addr.net = t_net;
|
addr.net = t_net;
|
||||||
addr.node = t_node;
|
addr.node = t_node;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user