diff --git a/notify.c b/notify.c index d2ff9d07..d6d1d8a0 100644 --- a/notify.c +++ b/notify.c @@ -28,13 +28,13 @@ notify_free(struct terminal *term, struct notification *notif) free(notif->body); free(notif->icon); free(notif->xdg_token); - free(notif->stdout); + free(notif->stdout_data); } static void consume_stdout(struct notification *notif, bool eof) { - char *data = notif->stdout; + char *data = notif->stdout_data; const char *line = data; size_t left = notif->stdout_sz; @@ -60,7 +60,7 @@ consume_stdout(struct notification *notif, bool eof) left -= len + (eol != NULL ? 1 : 0); } - memmove(notif->stdout, data, left); + memmove(notif->stdout_data, data, left); notif->stdout_sz = left; } @@ -92,12 +92,12 @@ fdm_notify_stdout(struct fdm *fdm, int fd, int events, void *data) } if (count > 0 && notif != NULL) { - if (notif->stdout == NULL) { + if (notif->stdout_data == NULL) { xassert(notif->stdout_sz == 0); - notif->stdout = xmemdup(buf, count); + notif->stdout_data = xmemdup(buf, count); } else { - notif->stdout = xrealloc(notif->stdout, notif->stdout_sz + count); - memcpy(¬if->stdout[notif->stdout_sz], buf, count); + notif->stdout_data = xrealloc(notif->stdout_data, notif->stdout_sz + count); + memcpy(¬if->stdout_data[notif->stdout_sz], buf, count); } notif->stdout_sz += count; @@ -156,7 +156,7 @@ notify_notify(const struct terminal *term, struct notification *notif) xassert(notif->xdg_token == NULL); xassert(notif->pid == 0); xassert(notif->stdout_fd == 0); - xassert(notif->stdout == NULL); + xassert(notif->stdout_data == NULL); notif->pid = -1; notif->stdout_fd = -1; diff --git a/notify.h b/notify.h index cc34ff74..ec62e03e 100644 --- a/notify.h +++ b/notify.h @@ -45,7 +45,7 @@ struct notification { pid_t pid; /* Notifier command PID */ int stdout_fd; /* Notifier command's stdout */ - char *stdout; /* Data we've reado from command's stdout */ + char *stdout_data; /* Data we've reado from command's stdout */ size_t stdout_sz; };