clang-format: bring back ForeachMacros (#3948)

* clang-format: bring back ForeachMacros

ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.

* Add curly braces

Co-authored-by: Orestis Floros <orestisflo@gmail.com>
This commit is contained in:
xzfc
2020-02-19 10:31:09 +00:00
committed by GitHub
parent e3f120c0b6
commit 1f0c628cde
37 changed files with 363 additions and 329 deletions

View File

@ -36,7 +36,7 @@ static void startup_timeout(EV_P_ ev_timer *w, int revents) {
DLOG("Timeout for startup sequence %s\n", id);
struct Startup_Sequence *current, *sequence = NULL;
TAILQ_FOREACH(current, &startup_sequences, sequences) {
TAILQ_FOREACH (current, &startup_sequences, sequences) {
if (strcmp(current->id, id) != 0)
continue;
@ -220,7 +220,7 @@ void startup_monitor_event(SnMonitorEvent *event, void *userdata) {
/* Get the corresponding internal startup sequence */
const char *id = sn_startup_sequence_get_id(snsequence);
struct Startup_Sequence *current, *sequence = NULL;
TAILQ_FOREACH(current, &startup_sequences, sequences) {
TAILQ_FOREACH (current, &startup_sequences, sequences) {
if (strcmp(current->id, id) != 0)
continue;
@ -264,7 +264,7 @@ void startup_monitor_event(SnMonitorEvent *event, void *userdata) {
*/
void startup_sequence_rename_workspace(const char *old_name, const char *new_name) {
struct Startup_Sequence *current;
TAILQ_FOREACH(current, &startup_sequences, sequences) {
TAILQ_FOREACH (current, &startup_sequences, sequences) {
if (strcmp(current->workspace, old_name) != 0)
continue;
DLOG("Renaming workspace \"%s\" to \"%s\" in startup sequence %s.\n",
@ -320,7 +320,7 @@ struct Startup_Sequence *startup_sequence_get(i3Window *cwindow,
sasprintf(&startup_id, "%.*s", xcb_get_property_value_length(startup_id_reply),
(char *)xcb_get_property_value(startup_id_reply));
struct Startup_Sequence *current, *sequence = NULL;
TAILQ_FOREACH(current, &startup_sequences, sequences) {
TAILQ_FOREACH (current, &startup_sequences, sequences) {
if (strcmp(current->id, startup_id) != 0)
continue;