mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Fix minor coding-style violations
...based on https://github.com/johanmalm/checkpatch.pl
This commit is contained in:
parent
439cf4f848
commit
d424514e24
14 changed files with 29 additions and 28 deletions
|
|
@ -12,17 +12,19 @@ void
|
|||
increase_nofile_limit(void)
|
||||
{
|
||||
if (getrlimit(RLIMIT_NOFILE, &original_nofile_rlimit) != 0) {
|
||||
wlr_log_errno(WLR_ERROR, "Failed to bump max open files limit: getrlimit(NOFILE) failed");
|
||||
wlr_log_errno(WLR_ERROR,
|
||||
"Failed to bump max open files limit: getrlimit(NOFILE) failed");
|
||||
return;
|
||||
}
|
||||
|
||||
struct rlimit new_rlimit = original_nofile_rlimit;
|
||||
new_rlimit.rlim_cur = new_rlimit.rlim_max;
|
||||
if (setrlimit(RLIMIT_NOFILE, &new_rlimit) != 0) {
|
||||
wlr_log_errno(WLR_ERROR, "Failed to bump max open files limit: setrlimit(NOFILE) failed");
|
||||
wlr_log_errno(WLR_ERROR,
|
||||
"Failed to bump max open files limit: setrlimit(NOFILE) failed");
|
||||
|
||||
wlr_log(WLR_INFO, "Running with %d max open files",
|
||||
(int)original_nofile_rlimit.rlim_cur);
|
||||
(int)original_nofile_rlimit.rlim_cur);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ multi_rect_set_size(struct multi_rect *rect, int width, int height)
|
|||
int line_width = rect->line_width;
|
||||
|
||||
for (size_t i = 0; i < 3; i++) {
|
||||
|
||||
/* Reposition, top and left don't ever change */
|
||||
wlr_scene_node_set_position(&rect->right[i]->node,
|
||||
width - (i + 1) * line_width, i * line_width);
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ _handle_node_destroy(struct wl_listener *listener, void *data)
|
|||
static void
|
||||
_handle_output_enter(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct scaled_scene_buffer *self
|
||||
= wl_container_of(listener, self, output_enter);
|
||||
struct scaled_scene_buffer *self =
|
||||
wl_container_of(listener, self, output_enter);
|
||||
/* primary_output is the output most of the node area is in */
|
||||
struct wlr_scene_output *primary = self->scene_buffer->primary_output;
|
||||
/* scene_output is the output we just entered */
|
||||
|
|
@ -132,8 +132,8 @@ _handle_output_enter(struct wl_listener *listener, void *data)
|
|||
static void
|
||||
_handle_output_leave(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct scaled_scene_buffer *self
|
||||
= wl_container_of(listener, self, output_leave);
|
||||
struct scaled_scene_buffer *self =
|
||||
wl_container_of(listener, self, output_leave);
|
||||
/* primary_output is the output most of the node area is in */
|
||||
struct wlr_scene_output *primary = self->scene_buffer->primary_output;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue