Changeset View
Changeset View
Standalone View
Standalone View
usr.sbin/fwcontrol/fwcontrol.c
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
str2node(int fd, const char *nodestr) | str2node(int fd, const char *nodestr) | ||||
{ | { | ||||
struct eui64 eui, tmpeui; | struct eui64 eui, tmpeui; | ||||
struct fw_devlstreq *data; | struct fw_devlstreq *data; | ||||
char *endptr; | char *endptr; | ||||
int i, node; | int i, node; | ||||
if (nodestr == '\0') | if (nodestr == NULL || *nodestr == '\0') | ||||
return (-1); | return (-1); | ||||
/* | /* | ||||
* Deal with classic node specifications. | * Deal with classic node specifications. | ||||
*/ | */ | ||||
node = strtol(nodestr, &endptr, 0); | node = strtol(nodestr, &endptr, 0); | ||||
if (*endptr == '\0') | if (*endptr == '\0') | ||||
goto gotnode; | goto gotnode; | ||||
▲ Show 20 Lines • Show All 951 Lines • Show Last 20 Lines |