struct shash_node *node;
ds_put_cstr(&ds, "The available commands are:\n");
- HMAP_FOR_EACH (node, struct shash_node, node, &commands.map) {
+ SHASH_FOR_EACH (node, &commands) {
ds_put_format(&ds, "\t%s\n", node->name);
}
unixctl_command_reply(conn, 214, ds_cstr(&ds));
s = ds_cstr(&line);
if (*reply_code == -1) {
- if (!isdigit(s[0]) || !isdigit(s[1]) || !isdigit(s[2])) {
+ if (!isdigit((unsigned char)s[0])
+ || !isdigit((unsigned char)s[1])
+ || !isdigit((unsigned char)s[2])) {
VLOG_WARN("reply from %s does not start with 3-digit code",
client->connect_path);
error = EPROTO;