fix wrong type for terminating nil argument for execl()
we have to use (void*)0 instead of (int)0 otherwise the upper bits are uninitialized on amd64.
This commit is contained in:
parent
492958f08e
commit
c76243e7e5
8 changed files with 10 additions and 10 deletions
|
@ -676,7 +676,7 @@ execproc(void *v)
|
|||
}
|
||||
if(!procstderr)
|
||||
close(2);
|
||||
procexecl(e->sync, "/bin/rc", "rc", "-c", e->cmd, 0);
|
||||
procexecl(e->sync, "/bin/rc", "rc", "-c", e->cmd, nil);
|
||||
error("can't exec");
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ decoutput(FLAC__StreamDecoder *dec, FLAC__Frame *frame, FLAC__int32 *buffer[], v
|
|||
dup2(pfd[1], 0);
|
||||
close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, nil);
|
||||
fprintf(stderr, "Error executing converter\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ output(void *, struct mad_header const* header, struct mad_pcm *pcm)
|
|||
dup(pfd[1], 0);
|
||||
close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, nil);
|
||||
sysfatal("exec: %r");
|
||||
}
|
||||
close(pfd[1]);
|
||||
|
|
|
@ -61,7 +61,7 @@ output(float **pcm, int samples, vorbis_info *vi)
|
|||
dup2(pfd[1], 0);
|
||||
close(pfd[1]);
|
||||
close(pfd[0]);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, nil);
|
||||
fprintf(stderr, "Error executing converter\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ main(int, char *argv[])
|
|||
}
|
||||
if(len > 0){
|
||||
snprint(buf, sizeof(buf), "%lud", len);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, "-l", buf, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, "-l", buf, nil);
|
||||
} else
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, nil);
|
||||
}
|
||||
|
|
|
@ -97,5 +97,5 @@ main(int, char *argv[])
|
|||
sysfatal("wave format (0x%lux) not supported", (ulong)wav.fmt);
|
||||
}
|
||||
snprint(buf, sizeof(buf), "%lud", len);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, "-l", buf, 0);
|
||||
execl("/bin/audio/pcmconv", "pcmconv", "-i", fmt, "-l", buf, nil);
|
||||
}
|
||||
|
|
|
@ -809,7 +809,7 @@ void filter(int fd, char *cmd){
|
|||
break;
|
||||
case 0:
|
||||
dupfds(fd, 1, 2, -1);
|
||||
execl("/bin/rc", "rc", "-c", cmd, 0);
|
||||
execl("/bin/rc", "rc", "-c", cmd, nil);
|
||||
_exits(0);
|
||||
}
|
||||
close(fd);
|
||||
|
|
|
@ -195,8 +195,8 @@ tcs(int fd0, int fd1)
|
|||
}
|
||||
close(pfd[0]);
|
||||
close(pfd[1]);
|
||||
execl("/bin/tcs", "tcs", fd0 < 0 ? "-f" : "-t", charset, 0);
|
||||
execl("/bin/cat", "cat", 0);
|
||||
execl("/bin/tcs", "tcs", fd0 < 0 ? "-f" : "-t", charset, nil);
|
||||
execl("/bin/cat", "cat", nil);
|
||||
_exits(0);
|
||||
}
|
||||
close(pfd[0]);
|
||||
|
|
Loading…
Reference in a new issue