diff options
author | 2022-09-08 12:18:09 +0000 | |
---|---|---|
committer | 2022-09-12 13:23:29 +0000 | |
commit | 6ee6b65ef03f8a479cccb2ae04e6b156f309f045 (patch) | |
tree | ea59d0e048c53c40490bc7290eda09ccad954423 /hicn-light/src/hicn/cli/hicns.c | |
parent | cb6f5724b85e51295498a39144ed4ccce114ad53 (diff) |
feat(slab): add slab allocator to store hashtables' keys
Ref: HICN-777
Signed-off-by: Enrico Loparco (eloparco) <eloparco@cisco.com>
Change-Id: Ibbd5c5e73cfd2f6adf757f7248dff8a933515d21
Diffstat (limited to 'hicn-light/src/hicn/cli/hicns.c')
-rw-r--r-- | hicn-light/src/hicn/cli/hicns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hicn-light/src/hicn/cli/hicns.c b/hicn-light/src/hicn/cli/hicns.c index fa668062d..c03fa8599 100644 --- a/hicn-light/src/hicn/cli/hicns.c +++ b/hicn-light/src/hicn/cli/hicns.c @@ -58,7 +58,7 @@ int shell(hc_sock_t *s) { hc_command_t command = {0}; char *pos; - if ((pos = strchr(line, '\n')) != NULL) { + if (line != NULL && (pos = strchr(line, '\n')) != NULL) { *pos = '\0'; } else { fprintf(stderr, "Error while reading command.\n"); |