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:
@@ -128,7 +128,7 @@ CFGFUN(enter_mode, const char *pango_markup, const char *modename) {
|
||||
}
|
||||
|
||||
struct Mode *mode;
|
||||
SLIST_FOREACH(mode, &modes, modes) {
|
||||
SLIST_FOREACH (mode, &modes, modes) {
|
||||
if (strcmp(mode->name, modename) == 0) {
|
||||
ELOG("The binding mode with name \"%s\" is defined at least twice.\n", modename);
|
||||
}
|
||||
@@ -348,7 +348,7 @@ CFGFUN(workspace, const char *workspace, const char *output) {
|
||||
if (workspace) {
|
||||
FREE(current_workspace);
|
||||
|
||||
TAILQ_FOREACH(assignment, &ws_assignments, ws_assignments) {
|
||||
TAILQ_FOREACH (assignment, &ws_assignments, ws_assignments) {
|
||||
if (strcasecmp(assignment->name, workspace) == 0) {
|
||||
ELOG("You have a duplicate workspace assignment for workspace \"%s\"\n",
|
||||
workspace);
|
||||
@@ -542,7 +542,7 @@ static void bar_configure_binding(const char *button, const char *release, const
|
||||
const bool release_bool = release != NULL;
|
||||
|
||||
struct Barbinding *current;
|
||||
TAILQ_FOREACH(current, &(current_bar->bar_bindings), bindings) {
|
||||
TAILQ_FOREACH (current, &(current_bar->bar_bindings), bindings) {
|
||||
if (current->input_code == input_code && current->release == release_bool) {
|
||||
ELOG("command for button %s was already specified, ignoring.\n", button);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user