Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/nspath.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static inline int path_components(const char *path)
int comps = 1;
if (!path)
return 0;
for (slash = strchr(path, '/'); slash; slash = strchr(slash + 1, '/'))
for (slash = (char *)strchr(path, '/'); slash; slash = strchr(slash + 1, '/'))
comps++;
return comps;
}
Expand Down
4 changes: 2 additions & 2 deletions src/naemon/checks.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ struct check_output *parse_output(const char *buf, struct check_output *check_ou
perf_data_string = g_string_new(NULL);
tmp = strtok_r(tmpbuf, "\n", &saveptr);
if (tmp != NULL) {
p = strpbrk((const char *) tmp, "|");
p = (char *)strpbrk((const char *) tmp, "|");
}
if (p == NULL) {
/* No perfdata in first line of output. */
Expand All @@ -138,7 +138,7 @@ struct check_output *parse_output(const char *buf, struct check_output *check_ou
if ((tmp = strtok_r(NULL, "", &saveptr))) {

/* Is there a perf data delimiter somewhere in the long output? */
p = strpbrk((const char *) tmp, "|");
p = (char *)strpbrk((const char *) tmp, "|");
if (p == NULL) {
/* No more perfdata, rest is long output*/
check_output->long_output = nm_strdup(tmp);
Expand Down
2 changes: 1 addition & 1 deletion src/naemon/objects_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ command *find_bang_command(const char *name)
if (!name)
return NULL;

bang = strchr(name, '!');
bang = (char *)strchr(name, '!');
if (!bang)
return find_command(name);
*bang = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/naemon/workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static struct wproc_list *get_wproc_list(const char *cmd)
return &workers;

/* first, look for a specialized worker for this command */
if ((space = strchr(cmd, ' ')) != NULL) {
if ((space = (char *)strchr(cmd, ' ')) != NULL) {
int namelen = (unsigned long)space - (unsigned long)cmd;
cmd_name = nm_calloc(1, namelen + 1);
memcpy(cmd_name, cmd, namelen);
Expand Down
Loading