From cfb359736f842d04692506d0b42562033effe81d Mon Sep 17 00:00:00 2001 From: Christian Barthel Date: Sat, 5 Feb 2022 07:40:03 +0100 Subject: [PATCH] Whitespace cleanup --- xmem.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/xmem.c b/xmem.c index a5a111d..05b4603 100644 --- a/xmem.c +++ b/xmem.c @@ -136,20 +136,20 @@ int main(int argc, char **argv) Arg args[1]; Pixmap icon_pixmap = None; char *label, host[256]; - + /* For security reasons, we reset our uid/gid after doing the necessary system initialization and before calling any X routines. */ - - if (setgid(getgid()) == -1) + + if (setgid(getgid()) == -1) errx(1, "%s: setgid failed: %s\n", argv[0], strerror(errno)); - if (setuid(getuid()) == -1) + if (setuid(getuid()) == -1) errx(1, "%s: setuid failed: %s\n", argv[0], strerror(errno)); - + toplevel = XtAppInitialize(&app_con, "XMem", options_mem, XtNumber(options_mem), &argc, argv, NULL, NULL, (Cardinal) 0); - + if (argc != 1) usage(argv[0]); - + XtGetApplicationResources( toplevel, (XtPointer) &resources, my_resources_mem, XtNumber(my_resources_mem), NULL, (Cardinal) 0); @@ -160,7 +160,7 @@ int main(int argc, char **argv) XtAppAddActions (app_con, xload_actions, XtNumber(xload_actions)); XtOverrideTranslations(toplevel, XtParseTranslationTable ("WM_PROTOCOLS: quit()")); - + XtSetArg (args[0], XtNiconPixmap, &icon_pixmap); XtGetValues(toplevel, args, ONE); if (icon_pixmap == None) { @@ -171,33 +171,33 @@ int main(int argc, char **argv) xload_width, xload_height)); XtSetValues (toplevel, args, ONE); } - + if (resources.show_label) { pane = XtCreateManagedWidget ("paned", panedWidgetClass, toplevel, NULL, ZERO); - + label_wid = XtCreateManagedWidget ("label", labelWidgetClass, pane, NULL, ZERO); - + XtSetArg (args[0], XtNlabel, &label); XtGetValues(label_wid, args, ONE); - + if ( strcmp("label", label) == 0 ) { (void) XmuGetHostname (host, 255); XtSetArg (args[0], XtNlabel, host); XtSetValues (label_wid, args, ONE); } - + load_parent = pane; } else load_parent = toplevel; - - + + load = XtCreateManagedWidget ("mem", memStripChartWidgetClass, load_parent, NULL, ZERO); XtAddCallback(load, XtNgetValue, (void*)GetMemLoadPoint, NULL); - + XtRealizeWidget (toplevel); wm_delete_window = XInternAtom (XtDisplay(toplevel), "WM_DELETE_WINDOW", False); @@ -205,12 +205,12 @@ int main(int argc, char **argv) &wm_delete_window, 1); #if __OpenBSD__ - if (pledge("ps vminfo stdio", NULL) == -1) - errx(1, "pledge failed: %s", strerror(errno)); + if (pledge("ps vminfo stdio", NULL) == -1) + errx(1, "pledge failed: %s", strerror(errno)); #endif XtAppMainLoop(app_con); - return 0; + return 0; }