Skip to content

Commit

Permalink
tree; Remove dead stores
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Feb 21, 2022
1 parent 90f3a36 commit ea504b4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
6 changes: 1 addition & 5 deletions mx_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ int mx_log_printf(const char *fmt, ...)
{
int len;
int len2;
int res;
char *msg = NULL;
va_list ap;

Expand All @@ -84,15 +83,12 @@ int mx_log_printf(const char *fmt, ...)
}

len2 = fprintf(stderr, "%s\n", msg);
res = fflush(stderr);
fflush(stderr);
mx_free_null(msg);

if (len2 != len+1)
return -(errno=EIO);

if (!res)
res = 0;

return len;
}

Expand Down
2 changes: 0 additions & 2 deletions mx_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ static struct mx_proc_tree_node *mx_proc_tree_find_by_pid(struct mx_proc_tree_no
if (pid == 0)
return NULL;

current = ptn;

for (current = ptn; current; current=current->next) {
if (current->pinfo.pstat->pid == pid)
return current;
Expand Down
3 changes: 0 additions & 3 deletions mxqps.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ int mx_proc_tree_node_print_debug(struct mx_proc_tree_node *ptn, int lvl)
assert(ptn);

struct mx_proc_tree_node *current;

current = ptn;

long pagesize;

pagesize = sysconf(_SC_PAGESIZE);
Expand Down

0 comments on commit ea504b4

Please sign in to comment.