mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Remove unneeded test and extra enforcement of 0 terminated buffer
This commit is contained in:
parent
ebae594c08
commit
3446e88cb8
3 changed files with 4 additions and 3 deletions
|
@ -8,5 +8,5 @@ pushd "${MESON_BUILD_ROOT}"
|
||||||
|
|
||||||
for a in $@
|
for a in $@
|
||||||
do
|
do
|
||||||
go-md2man -in $a -out ${a%.markdown}
|
go-md2man -in "$a" -out ${a%.markdown}
|
||||||
done
|
done
|
||||||
|
|
|
@ -582,8 +582,9 @@ int create_pid_file(const char *pidfile, gboolean kill_running) {
|
||||||
char buffer[64] = {
|
char buffer[64] = {
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
ssize_t l = read(fd, &buffer, 64);
|
ssize_t l = read(fd, &buffer, 63);
|
||||||
if (l > 1) {
|
if (l > 1) {
|
||||||
|
buffer[l] = 0;
|
||||||
pid_t pid = g_ascii_strtoll(buffer, NULL, 0);
|
pid_t pid = g_ascii_strtoll(buffer, NULL, 0);
|
||||||
kill(pid, SIGTERM);
|
kill(pid, SIGTERM);
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
|
@ -1074,7 +1074,7 @@ int main(int argc, char *argv[]) {
|
||||||
*/
|
*/
|
||||||
const char **theme_str = find_arg_strv("-theme-str");
|
const char **theme_str = find_arg_strv("-theme-str");
|
||||||
if (theme_str) {
|
if (theme_str) {
|
||||||
for (int index = 0; theme_str && theme_str[index]; index++) {
|
for (int index = 0; theme_str[index]; index++) {
|
||||||
if (rofi_theme_parse_string(theme_str[index])) {
|
if (rofi_theme_parse_string(theme_str[index])) {
|
||||||
g_warning("Failed to parse -theme-str option: \"%s\"",
|
g_warning("Failed to parse -theme-str option: \"%s\"",
|
||||||
theme_str[index]);
|
theme_str[index]);
|
||||||
|
|
Loading…
Reference in a new issue