diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-01-06 08:35:35 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-01-09 11:07:38 +1000 |
commit | 2b537d3bad97ff18c2a9f949305655fb5055a8d1 (patch) | |
tree | 9157b400acec3e8ac5d422e2921965b49f22de8a | |
parent | 205a5e1e1fe0bbe51e59d5aa5248c43c589fd38b (diff) |
xts5: remove (type *)NULL casts
Coccinelle patch:
@@
type T;
@@
- (T *)NULL
+ NULL
with a bit of manual massaging to skip botched hunks
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
60 files changed, 129 insertions, 129 deletions
diff --git a/xts5/XI/AllowDeviceEvents.m b/xts5/XI/AllowDeviceEvents.m index aa489ff3..90e26a27 100644 --- a/xts5/XI/AllowDeviceEvents.m +++ b/xts5/XI/AllowDeviceEvents.m @@ -122,7 +122,7 @@ static int grabstartup() { - if (Dsp==(Display *)NULL) + if (Dsp==NULL) return; if (!Setup_Extension_DeviceInfo(BtnMask)) diff --git a/xts5/XI/UngrabDeviceButton.m b/xts5/XI/UngrabDeviceButton.m index 16cb9bda..64c214bd 100644 --- a/xts5/XI/UngrabDeviceButton.m +++ b/xts5/XI/UngrabDeviceButton.m @@ -199,12 +199,12 @@ static Bool dgrabbed(dev, win) Display *client1; /* Create client1, without causing resource registration. */ - if (config.display == (char *) NULL) { + if (config.display == NULL) { delete("config.display not set"); return; } client1 = XOpenDisplay(config.display); - if (client1 == (Display *) NULL) { + if (client1 == NULL) { delete("Couldn't create client1."); return; } diff --git a/xts5/XI/XGetDeviceKeyMapping.m b/xts5/XI/XGetDeviceKeyMapping.m index 7b3dd9b2..69dd2532 100644 --- a/xts5/XI/XGetDeviceKeyMapping.m +++ b/xts5/XI/XGetDeviceKeyMapping.m @@ -136,7 +136,7 @@ int numkeys; startup(); - if (Dsp==(Display *)NULL) + if (Dsp==NULL) return; if (!Setup_Extension_DeviceInfo(KeyMask)) diff --git a/xts5/XI/XGetDeviceModifierMapping.m b/xts5/XI/XGetDeviceModifierMapping.m index c4c29049..a94a6289 100644 --- a/xts5/XI/XGetDeviceModifierMapping.m +++ b/xts5/XI/XGetDeviceModifierMapping.m @@ -164,12 +164,12 @@ int ret; Display *client1; /* Create client1, without causing resource registration. */ - if (config.display == (char *) NULL) { + if (config.display == NULL) { delete("config.display not set"); return; } client1 = XOpenDisplay(config.display); - if (client1 == (Display *) NULL) { + if (client1 == NULL) { delete("Couldn't create client1."); return; } diff --git a/xts5/XIproto/GetDeviceDontPropagateList.m b/xts5/XIproto/GetDeviceDontPropagateList.m index d412e452..33098796 100644 --- a/xts5/XIproto/GetDeviceDontPropagateList.m +++ b/xts5/XIproto/GetDeviceDontPropagateList.m @@ -143,7 +143,7 @@ Display *client1, *opendisplay(); return; } client1 = opendisplay(); - if (client1 == (Display *) NULL) { + if (client1 == NULL) { delete("Can not open display"); return; } diff --git a/xts5/XIproto/GetSelectedExtensionEvents.m b/xts5/XIproto/GetSelectedExtensionEvents.m index 62737ba9..7a441f7b 100644 --- a/xts5/XIproto/GetSelectedExtensionEvents.m +++ b/xts5/XIproto/GetSelectedExtensionEvents.m @@ -141,7 +141,7 @@ Window w; } client1 = opendisplay(); - if (client1 == (Display *) NULL) { + if (client1 == NULL) { delete("Can not open display"); return; } diff --git a/xts5/XIproto/Miscellaneous.m b/xts5/XIproto/Miscellaneous.m index e3bf53f0..be622597 100644 --- a/xts5/XIproto/Miscellaneous.m +++ b/xts5/XIproto/Miscellaneous.m @@ -137,7 +137,7 @@ XDevice *dev; Create_Default_Window(CLIENT); dpy2 = opendisplay(); - if (dpy2 == (Display *) NULL) { + if (dpy2 == NULL) { delete("Can not open display"); return; } diff --git a/xts5/Xlib11/GraphicsExpose.m b/xts5/Xlib11/GraphicsExpose.m index 8db2f94e..ed39ab8c 100644 --- a/xts5/Xlib11/GraphicsExpose.m +++ b/xts5/Xlib11/GraphicsExpose.m @@ -125,7 +125,7 @@ unsigned int width; nextvinf(&vp); winpair(display, vp, &w1, &w2); - getsize(display, w1, &width, (unsigned int *) NULL); + getsize(display, w1, &width, NULL); /* Create a gc with graphics-exposures flag set to True. */ gc = makegc(display, w2); XSetGraphicsExposures(display, gc, True); diff --git a/xts5/Xlib12/XIfEvent.m b/xts5/Xlib12/XIfEvent.m index 42d71769..48e2e959 100644 --- a/xts5/Xlib12/XIfEvent.m +++ b/xts5/Xlib12/XIfEvent.m @@ -107,7 +107,7 @@ XIfEvent(display, event_return, predicate, arg) Display *display = Dsp; XEvent *event_return = &_event; Predicate predicate = _predicate; -char *arg = (char *) NULL; +char *arg = NULL; >>EXTERN /* * Can not use "xcall" because it empties the event queue. diff --git a/xts5/Xlib13/XAllowEvents.m b/xts5/Xlib13/XAllowEvents.m index cce441d0..f3d2085d 100644 --- a/xts5/Xlib13/XAllowEvents.m +++ b/xts5/Xlib13/XAllowEvents.m @@ -1127,7 +1127,7 @@ int bothset() XDevice *xDevice; XDeviceInfo *list; - if ((list = XListInputDevices (display, &ndevices)) == (XDeviceInfo *)NULL) + if ((list = XListInputDevices (display, &ndevices)) == NULL) { report("ERROR: XListInputDevices failed"); tet_result(TET_FAIL); @@ -1146,7 +1146,7 @@ int bothset() XUngrabKeyboard(display, CurrentTime); break; case IsXExtensionDevice: - if ((xDevice = XOpenDevice(display, list->id)) == (XDevice *)NULL) + if ((xDevice = XOpenDevice(display, list->id)) == NULL) { report("WARNING: XOpenDevice(%s) failed", list->name); continue; diff --git a/xts5/Xlib13/XGetKeyboardMapping.m b/xts5/Xlib13/XGetKeyboardMapping.m index 83530840..27b6d777 100644 --- a/xts5/Xlib13/XGetKeyboardMapping.m +++ b/xts5/Xlib13/XGetKeyboardMapping.m @@ -140,7 +140,7 @@ int i; startup(); - if (Dsp==(Display *)NULL) + if (Dsp==NULL) return; XDisplayKeycodes(Dsp, &tmp, &last); diff --git a/xts5/Xlib15/XFreeStringList.m b/xts5/Xlib15/XFreeStringList.m index 077747df..61796a63 100644 --- a/xts5/Xlib15/XFreeStringList.m +++ b/xts5/Xlib15/XFreeStringList.m @@ -100,7 +100,7 @@ purpose. It is provided "as is" without express or implied warranty. >>TITLE XFreeStringList Xlib15 void XFreeStringList(list) -char **list = (char **) NULL; +char **list = NULL; >>ASSERTION Good A A call to xname frees the memory allocated by a call to .S XTextPropertyToStringList @@ -121,8 +121,8 @@ char *str3 = "TestString3"; int argc = 3; char *argv[3]; int rargc; -char **rargv = (char **) NULL; -char **rargv1 = (char **) NULL; +char **rargv = NULL; +char **rargv1 = NULL; Window w; XVisualInfo *vp; XTextProperty tp; diff --git a/xts5/Xlib15/XGetCommand.m b/xts5/Xlib15/XGetCommand.m index a08447e1..a29166de 100644 --- a/xts5/Xlib15/XGetCommand.m +++ b/xts5/Xlib15/XGetCommand.m @@ -140,7 +140,7 @@ char *str2 = "XTest string 2__"; char *str3 = "XTest string 3___"; int nstrs = 3; char *prop[3]; -char **rstrings = (char**) NULL; +char **rstrings = NULL; int rcount = 0; int i; @@ -218,7 +218,7 @@ Verify that the call returned zero. Status status; char *s = "XTestString1"; XVisualInfo *vp; -char **rstrings = (char **) NULL; +char **rstrings = NULL; int rcount = 0; resetvinf(VI_WIN); diff --git a/xts5/Xlib15/XGetIconSizes.m b/xts5/Xlib15/XGetIconSizes.m index 19670f56..78075d98 100644 --- a/xts5/Xlib15/XGetIconSizes.m +++ b/xts5/Xlib15/XGetIconSizes.m @@ -139,7 +139,7 @@ int v; XIconSize sizelist[5]; int count = 5; int rcount; -XIconSize *sp = (XIconSize *) NULL, *sref; +XIconSize *sp = NULL, *sref; resetvinf(VI_WIN); diff --git a/xts5/Xlib15/XGetWMColormapWindows.m b/xts5/Xlib15/XGetWMColormapWindows.m index 7d8d7cef..60d00e17 100644 --- a/xts5/Xlib15/XGetWMColormapWindows.m +++ b/xts5/Xlib15/XGetWMColormapWindows.m @@ -137,7 +137,7 @@ Status status; XVisualInfo *vp; int nwins = 7; Window pwins[7]; -Window *rwins = (Window *) NULL; +Window *rwins = NULL; Window *wp; int rcnt = 0; int i; diff --git a/xts5/Xlib15/XGetWMProtocols.m b/xts5/Xlib15/XGetWMProtocols.m index b2bb735f..142650f3 100644 --- a/xts5/Xlib15/XGetWMProtocols.m +++ b/xts5/Xlib15/XGetWMProtocols.m @@ -138,7 +138,7 @@ Status status; XVisualInfo *vp; int nats = 5; Atom prots[5]; -Atom *retprots = (Atom *) NULL; +Atom *retprots = NULL; Atom at, *atp; int i, cntret; diff --git a/xts5/Xlib15/XSetIconSizes.m b/xts5/Xlib15/XSetIconSizes.m index 4f49a58a..ba9cad99 100644 --- a/xts5/Xlib15/XSetIconSizes.m +++ b/xts5/Xlib15/XSetIconSizes.m @@ -137,7 +137,7 @@ XVisualInfo *vp; unsigned long leftover, nitems, len; int actual_format; Atom actual_type; -long *rsizelist = (long *) NULL, *rsp; +long *rsizelist = NULL, *rsp; XIconSize sizelist[7], *sp; int cnt = 7; int i, v; diff --git a/xts5/Xlib15/XSetRGBColormaps.m b/xts5/Xlib15/XSetRGBColormaps.m index e47fa6f7..55a6a2a3 100644 --- a/xts5/Xlib15/XSetRGBColormaps.m +++ b/xts5/Xlib15/XSetRGBColormaps.m @@ -139,7 +139,7 @@ int actual_format; unsigned long leftover; unsigned long nitems; XVisualInfo *vp; -XStandardColormap *rcmap = (XStandardColormap *) NULL; +XStandardColormap *rcmap = NULL; resetvinf(VI_WIN); nextvinf(&vp); diff --git a/xts5/Xlib15/XSetWMColormapWindows.m b/xts5/Xlib15/XSetWMColormapWindows.m index 76891b4a..c2259dd0 100644 --- a/xts5/Xlib15/XSetWMColormapWindows.m +++ b/xts5/Xlib15/XSetWMColormapWindows.m @@ -143,7 +143,7 @@ unsigned long nitems; unsigned long leftover; int nwins = 7; Window pwins[7]; -Window *rwins = (Window *) NULL; +Window *rwins = NULL; Window *wp; int i; diff --git a/xts5/Xlib15/XSetWMProperties/XSetWMProperties.m b/xts5/Xlib15/XSetWMProperties/XSetWMProperties.m index 32b7edeb..9ef85f7c 100644 --- a/xts5/Xlib15/XSetWMProperties/XSetWMProperties.m +++ b/xts5/Xlib15/XSetWMProperties/XSetWMProperties.m @@ -107,11 +107,11 @@ Display *display = Dsp; Window w = DRW(Dsp); XTextProperty *window_name = (XTextProperty *) NULL; XTextProperty *icon_name = (XTextProperty *) NULL; -char **argv = (char **) NULL; +char **argv = NULL; int argc = 0; -XSizeHints *normal_hints = (XSizeHints *) NULL; -XWMHints *wm_hints = (XWMHints *) NULL; -XClassHint *class_hints = (XClassHint *) NULL; +XSizeHints *normal_hints = NULL; +XWMHints *wm_hints = NULL; +XClassHint *class_hints = NULL; >>MAKE >># >># diff --git a/xts5/Xlib15/XSetWMProtocols.m b/xts5/Xlib15/XSetWMProtocols.m index 4df7db7a..7a6cf84a 100644 --- a/xts5/Xlib15/XSetWMProtocols.m +++ b/xts5/Xlib15/XSetWMProtocols.m @@ -142,7 +142,7 @@ int actual_format; Atom actual_type; int nats = 5; Atom xa_wm_protocols; -Atom prots[5], *rprots = (Atom *) NULL; +Atom prots[5], *rprots = NULL; Atom at, *atp; int i; diff --git a/xts5/Xlib16/putres.mc b/xts5/Xlib16/putres.mc index e970c4a0..ed6c68e7 100644 --- a/xts5/Xlib16/putres.mc +++ b/xts5/Xlib16/putres.mc @@ -118,10 +118,10 @@ static char *t1_specifiers[XRM_T1_TESTS] = { "Cutter.John.was*here" }; static char *qt1_specifiers[XRM_T1_TESTS][5] = { - { "opus" , "hodgepodge", "portnoy" , (char *)NULL, (char *)NULL }, - { "calvin", "and", "hobbes", (char *)NULL, (char *)NULL }, - { "The", "Far", "Side" , (char *)NULL, (char *)NULL }, - { "Cutter", "John", "was", "here", (char *)NULL } }; + { "opus" , "hodgepodge", "portnoy" , NULL, NULL }, + { "calvin", "and", "hobbes", NULL, NULL }, + { "The", "Far", "Side" , NULL, NULL }, + { "Cutter", "John", "was", "here", NULL } }; static XrmBinding qt1_bindings[XRM_T1_TESTS][4] = { { XrmBindTightly, XrmBindTightly, XrmBindTightly }, @@ -158,7 +158,7 @@ static char *t2_specifiers[2] = { "A.b*C" }; static char *qt2_specifier[] = { - "A", "b", "C", (char *)NULL }; + "A", "b", "C", NULL }; static XrmBinding qt2_bindings[] = { XrmBindTightly, XrmBindTightly, XrmBindLoosely }; diff --git a/xts5/Xlib17/XGetDefault/XGetDefault.m b/xts5/Xlib17/XGetDefault/XGetDefault.m index 27835efc..2faa6250 100644 --- a/xts5/Xlib17/XGetDefault/XGetDefault.m +++ b/xts5/Xlib17/XGetDefault/XGetDefault.m @@ -193,7 +193,7 @@ Verify that the call returned NULL. >>CODE unsigned char *pval = (unsigned char *) "XT.LEO:CAL\nXT.OPT:VAL\nXT.Bezoomny:Cal\n"; char *nullstr = "<NULL>"; -char *res = (char *) NULL; +char *res = NULL; XChangeProperty (Dsp, RootWindow(Dsp, 0), XA_RESOURCE_MANAGER, XA_STRING, 8, PropModeReplace, pval, 1+strlen((char *)pval)); @@ -296,7 +296,7 @@ char *argv[2]; char *envp; argv[0] = "./Test4"; - argv[1] = (char *) NULL; + argv[1] = NULL; envp = "XENVIRONMENT=./EnvXdefaults"; if (xtest_putenv(envp)) { delete("xtest_putenv failed to add XENVIRONMENT to the environment"); diff --git a/xts5/Xlib3/XConnectionNumber.m b/xts5/Xlib3/XConnectionNumber.m index 8b9da1ed..e416657a 100644 --- a/xts5/Xlib3/XConnectionNumber.m +++ b/xts5/Xlib3/XConnectionNumber.m @@ -133,7 +133,7 @@ int cnn; XSetIOErrorHandler( errorhandler ); client = opendisplay(); - if (client == (Display *) NULL) { + if (client == NULL) { report("Cannot open display."); exit(exit_status + 1); } else diff --git a/xts5/Xlib5/XChangeProperty.m b/xts5/Xlib5/XChangeProperty.m index c8737a0c..5305818a 100644 --- a/xts5/Xlib5/XChangeProperty.m +++ b/xts5/Xlib5/XChangeProperty.m @@ -109,7 +109,7 @@ Atom property = xcp_list[0]; Atom type = XA_INTEGER; int format = 32; int mode = PropModeReplace; -unsigned char *data = (unsigned char *)NULL; +unsigned char *data = NULL; int nelements = 0; >>EXTERN #include "X11/Xatom.h" diff --git a/xts5/Xlib5/XGetWindowProperty.m b/xts5/Xlib5/XGetWindowProperty.m index 5535d376..c7042a9b 100644 --- a/xts5/Xlib5/XGetWindowProperty.m +++ b/xts5/Xlib5/XGetWindowProperty.m @@ -138,7 +138,7 @@ set_vars() actual_format = -1; nitems = -1; bytes_after = -1; - prop = (unsigned char *)NULL; + prop = NULL; } static int diff --git a/xts5/Xopen/XAllocNamedColor.m b/xts5/Xopen/XAllocNamedColor.m index 0c169733..cab5a273 100644 --- a/xts5/Xopen/XAllocNamedColor.m +++ b/xts5/Xopen/XAllocNamedColor.m @@ -88,12 +88,12 @@ char *s; char *cp = s; int len = strlen(s); - if(s == (char *) NULL) - return((char *) NULL); + if(s == NULL) + return(NULL); - if((res = rp = (char*) malloc(len + 1)) == (char *) NULL) { + if((res = rp = (char*) malloc(len + 1)) == NULL) { delete("Malloc returned NULL."); - return((char *) NULL); + return(NULL); } while(*cp == ' ') diff --git a/xts5/Xopen/XLookupColor.m b/xts5/Xopen/XLookupColor.m index a55557d9..b28dee82 100644 --- a/xts5/Xopen/XLookupColor.m +++ b/xts5/Xopen/XLookupColor.m @@ -87,12 +87,12 @@ char *s; char *cp = s; int len = strlen(s); - if(s == (char *) NULL) - return((char *) NULL); + if(s == NULL) + return(NULL); - if((res = rp = (char*) malloc(len + 1)) == (char *) NULL) { + if((res = rp = (char*) malloc(len + 1)) == NULL) { delete("Malloc returned NULL."); - return((char *) NULL); + return(NULL); } while(*cp == ' ') diff --git a/xts5/Xt11/XtVaGetApplicationResources.m b/xts5/Xt11/XtVaGetApplicationResources.m index 8ba7443c..e5451703 100644 --- a/xts5/Xt11/XtVaGetApplicationResources.m +++ b/xts5/Xt11/XtVaGetApplicationResources.m @@ -221,7 +221,7 @@ int status; &base, resources2, XtNumber(resources), - (char *)NULL); + NULL); tet_infoline("TEST: Retrieved resource value"); if (strcmp(base.label, "2002") != 0) { sprintf(ebuf, "ERROR: Expected \"2002\", received \"%s\"", base.label); diff --git a/xts5/Xt11/XtVaGetSubvalues.m b/xts5/Xt11/XtVaGetSubvalues.m index e4725b78..7055e17b 100644 --- a/xts5/Xt11/XtVaGetSubvalues.m +++ b/xts5/Xt11/XtVaGetSubvalues.m @@ -133,10 +133,10 @@ pid_t pid2; (ArgList) NULL, (Cardinal)0); tet_infoline("PREP: Set subvalues"); XtVaSetSubvalues(&base, resources, 2, XtNforeground, 1, - XtNlabel, "Hello World", (char *)NULL); + XtNlabel, "Hello World", NULL); tet_infoline("PREP: Get subvalues"); XtVaGetSubvalues(&base, resources, 2, XtNforeground, &pixel, - XtNlabel, &string, (char *)NULL); + XtNlabel, &string, NULL); tet_infoline("TEST: Retrieved subvalues"); check_dec(1, pixel , XtNforeground); check_str("Hello World", string , XtNlabel); @@ -168,11 +168,11 @@ int status; (ArgList) NULL, (Cardinal)0); tet_infoline("PREP: Set subvalues"); XtVaSetSubvalues(&base, resources, 2, XtNforeground, 1, - XtNlabel, "Hello World", (char *)NULL); + XtNlabel, "Hello World", NULL); tet_infoline("PREP: Get subvalues"); XtVaGetSubvalues(&base, resources, 2, XtNforeground, &pixel, - XtVaTypedArg, XtNlabel, XtRString, string, 0, (char *)NULL); + XtVaTypedArg, XtNlabel, XtRString, string, 0, NULL); tet_infoline("TEST: Retrieved subvalues"); check_dec(1, pixel , XtNforeground); LKROF(pid2, AVSXTTIMEOUT-2); @@ -205,7 +205,7 @@ XtVarArgsList thelist; (ArgList) NULL, (Cardinal)0); tet_infoline("PREP: Set subvalues"); XtVaSetSubvalues(&base, resources, 2, XtNforeground, 1, - XtNlabel, "Hello World", (char *)NULL); + XtNlabel, "Hello World", NULL); tet_infoline("PREP: Get subvalues"); thelist=XtVaCreateArgsList(NULL, XtNforeground, &pixel, NULL); XtVaGetSubvalues(&base, resources, 2, XtVaNestedList, thelist, diff --git a/xts5/Xt11/XtVaSetSubvalues.m b/xts5/Xt11/XtVaSetSubvalues.m index 50c6a832..59722c63 100644 --- a/xts5/Xt11/XtVaSetSubvalues.m +++ b/xts5/Xt11/XtVaSetSubvalues.m @@ -134,10 +134,10 @@ pid_t pid2; (ArgList) NULL,(Cardinal)0); tet_infoline("PREP: Set subvalues"); XtVaSetSubvalues(&base, resources, 2, XtNforeground, 1, - XtNlabel, "Hello World", (char *)NULL); + XtNlabel, "Hello World", NULL); tet_infoline("PREP: Get subvalues"); XtVaGetSubvalues(&base, resources, 2, XtNforeground, &pixel, - XtNlabel, &string, (char *)NULL); + XtNlabel, &string, NULL); tet_infoline("TEST: Retrieved subvalues"); check_dec(1, pixel , XtNforeground); check_str("Hello World", string , XtNlabel); @@ -202,10 +202,10 @@ pid_t pid2; (ArgList) NULL,(Cardinal)0); tet_infoline("PREP: Set subvalues"); XtVaSetSubvalues(&base, resources, 2, XtNforeground, 1, - XtVaTypedArg, "name", "type", (XtArgVal)1, 1, XtNlabel, "Hello World", (char *)NULL); + XtVaTypedArg, "name", "type", (XtArgVal)1, 1, XtNlabel, "Hello World", NULL); tet_infoline("PREP: Get subvalues"); XtVaGetSubvalues(&base, resources, 2, XtNforeground, &pixel, - XtNlabel, &string, (char *)NULL); + XtNlabel, &string, NULL); tet_infoline("TEST: Retrieved subvalues"); check_dec(1, pixel , XtNforeground); check_str("Hello World", string , XtNlabel); diff --git a/xts5/Xt12/XtGetActionKeysym.m b/xts5/Xt12/XtGetActionKeysym.m index 3a3f23ce..3b0bf52d 100644 --- a/xts5/Xt12/XtGetActionKeysym.m +++ b/xts5/Xt12/XtGetActionKeysym.m @@ -79,7 +79,7 @@ Cardinal *num_params; * KeyPress or KeyRelease */ tet_infoline("TEST: XtGetActionKeysym returns correct keysym"); - k = XtGetActionKeysym(event, (Modifiers*)NULL); + k = XtGetActionKeysym(event, NULL); if (k != keysym) { sprintf(ebuf, "ERROR: XtGetActionKeysym did not return correct keysym (got %ld, wanted %ld", k, keysym); tet_infoline(ebuf); diff --git a/xts5/Xt13/XtAppWarningMsg.m b/xts5/Xt13/XtAppWarningMsg.m index 412435a2..7c763147 100644 --- a/xts5/Xt13/XtAppWarningMsg.m +++ b/xts5/Xt13/XtAppWarningMsg.m @@ -113,7 +113,7 @@ long invoked = 0; tet_infoline("TEST: Call XtAppWarningMsg"); push_stdout("outfile", "w"); XtAppWarningMsg(app_ctext, "This", "is a", "test", - "Hello World", (String *)NULL, (Cardinal *)0); + "Hello World", NULL, (Cardinal *)0); pop_stdout(); tet_infoline("TEST: Open the temporary file and read the message"); stream = (FILE *)fopen(msg, "r"); diff --git a/xts5/Xt13/XtResolvePathname/XtResolvePathname.m b/xts5/Xt13/XtResolvePathname/XtResolvePathname.m index 4f1f9251..71a6184b 100644 --- a/xts5/Xt13/XtResolvePathname/XtResolvePathname.m +++ b/xts5/Xt13/XtResolvePathname/XtResolvePathname.m @@ -372,7 +372,7 @@ char *contents = "ApTest.customization:CUSTOM"; (String)cfgdisplay, /* display name */ (String)NULL, /*application name use argv[0]*/ app_class, /* application class */ - (XrmOptionDescRec *)NULL, /* command line options */ + NULL, /* command line options */ (Cardinal)0, /* num command line options */ &argcount, argvector /* command line args */ @@ -424,7 +424,7 @@ char *contents = "ApTest.customization:CUSTOM"; XtNy, y_origin, XtNwidth, width, XtNheight, height, - (char *)NULL + NULL ); trace("Set up the XtToolkitError handler"); diff --git a/xts5/Xt4/XtAppInitialize.m b/xts5/Xt4/XtAppInitialize.m index ecaf3434..8796c9dc 100644 --- a/xts5/Xt4/XtAppInitialize.m +++ b/xts5/Xt4/XtAppInitialize.m @@ -568,7 +568,7 @@ int pstatus; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tinitlize", "-synchronous", (char *)NULL }; +char *argv[] = { "tinitlize", "-synchronous", NULL }; Widget widget_good; FORK(pid2); @@ -740,7 +740,7 @@ XrmValue toVal; Boolean closure; XtPointer closure_ret = (XtPointer *) &closure; int argc = 2; -char *argv[] = { "tdsplyintl2", "+rv", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "+rv", NULL }; Screen *screen; Colormap colormap; pid_t pid2; diff --git a/xts5/Xt4/XtDisplayInitialize.m b/xts5/Xt4/XtDisplayInitialize.m index 213dd771..b38bf8f9 100644 --- a/xts5/Xt4/XtDisplayInitialize.m +++ b/xts5/Xt4/XtDisplayInitialize.m @@ -177,7 +177,7 @@ int argc = 2; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tdsplyintl2", "-synchronous", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "-synchronous", NULL }; tet_infoline("PREP: Initialize the Xt toolkit"); XtToolkitInitialize(); @@ -402,7 +402,7 @@ XrmValue toVal; Boolean closure; XtPointer closure_ret = (XtPointer *) &closure; int argc = 2; -char *argv[] = { "tdsplyintl2", "+rv", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "+rv", NULL }; Screen *screen; Colormap colormap; pid_t pid2; diff --git a/xts5/Xt4/XtOpenDisplay.m b/xts5/Xt4/XtOpenDisplay.m index 15d20e47..b1895ea5 100644 --- a/xts5/Xt4/XtOpenDisplay.m +++ b/xts5/Xt4/XtOpenDisplay.m @@ -500,7 +500,7 @@ int argc = 2; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tdsplyintl2", "-synchronous", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "-synchronous", NULL }; tet_infoline("PREP: Initialize the Xt toolkit"); XtToolkitInitialize(); @@ -725,7 +725,7 @@ XrmValue toVal; Boolean closure; XtPointer closure_ret = (XtPointer *) &closure; int argc = 2; -char *argv[] = { "tdsplyintl2", "+rv", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "+rv", NULL }; Screen *screen; Colormap colormap; pid_t pid2; diff --git a/xts5/Xt4/XtVaAppInitialize.m b/xts5/Xt4/XtVaAppInitialize.m index 04f97275..3be008ea 100644 --- a/xts5/Xt4/XtVaAppInitialize.m +++ b/xts5/Xt4/XtVaAppInitialize.m @@ -574,7 +574,7 @@ int pstatus; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tinitlize", "-synchronous", (char *)NULL }; +char *argv[] = { "tinitlize", "-synchronous", NULL }; Widget widget_good; FORK(pid2); @@ -746,7 +746,7 @@ XrmValue toVal; Boolean closure; XtPointer closure_ret = (XtPointer *) &closure; int argc = 2; -char *argv[] = { "tdsplyintl2", "+rv", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "+rv", NULL }; Screen *screen; Colormap colormap; pid_t pid2; diff --git a/xts5/XtC/XtErrorMsg.m b/xts5/XtC/XtErrorMsg.m index 62f5f958..c9580cca 100644 --- a/xts5/XtC/XtErrorMsg.m +++ b/xts5/XtC/XtErrorMsg.m @@ -118,7 +118,7 @@ int invoked= 0; sprintf(ebuf, "TEST: Call XtErrorMsg"); tet_infoline(ebuf); push_stdout("outfile", "w"); - XtErrorMsg("This", "is a", "test", "Hello World", (String*)NULL, (Cardinal *)0); + XtErrorMsg("This", "is a", "test", "Hello World", NULL, (Cardinal *)0); pop_stdout(); tet_infoline("TEST: Open the temporary file and read the message"); stream = (FILE *)fopen(msg, "r"); diff --git a/xts5/XtC/XtInitialize.m b/xts5/XtC/XtInitialize.m index 37f81142..d6cd46ba 100644 --- a/xts5/XtC/XtInitialize.m +++ b/xts5/XtC/XtInitialize.m @@ -184,7 +184,7 @@ int pstatus; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tinitlize", "-synchronous", (char *)NULL }; +char *argv[] = { "tinitlize", "-synchronous", NULL }; Widget widget_good; FORK(pid2); @@ -549,7 +549,7 @@ int pstatus; ** -synchronous on ** +synchronous off */ -char *argv[] = { "tinitlize", "-synchronous", (char *)NULL }; +char *argv[] = { "tinitlize", "-synchronous", NULL }; Widget widget_good; FORK(pid2); @@ -716,7 +716,7 @@ XrmValue toVal; Boolean closure; XtPointer closure_ret = (XtPointer *) &closure; int argc = 2; -char *argv[] = { "tdsplyintl2", "+rv", (char *)NULL }; +char *argv[] = { "tdsplyintl2", "+rv", NULL }; Screen *screen; Colormap colormap; pid_t pid2; diff --git a/xts5/XtC/XtWarningMsg.m b/xts5/XtC/XtWarningMsg.m index 058ef25f..90c9c188 100644 --- a/xts5/XtC/XtWarningMsg.m +++ b/xts5/XtC/XtWarningMsg.m @@ -117,7 +117,7 @@ int invoked = 0; tet_infoline("TEST: Call XtWarningMsg"); push_stdout("outfile", "w"); XtWarningMsg("This", "is a", "test", "Hello World", - (String *)NULL, (Cardinal)0); + NULL, (Cardinal)0); pop_stdout(); tet_infoline("PREP: Open the temporary file and read the message"); stream = (FILE *)fopen(msg, "r"); diff --git a/xts5/src/lib/block.c b/xts5/src/lib/block.c index a65177ed..be2499f6 100644 --- a/xts5/src/lib/block.c +++ b/xts5/src/lib/block.c @@ -270,12 +270,12 @@ block_child_proc() XAnyEvent *event = (XAnyEvent *) gevent; display = opendisplay(); - if (display == (Display *) NULL) + if (display == NULL) exit(CHILD_EXIT_ERROR); sleep(CHILD_SLEEP_TIME); if (access(block_file, F_OK)) exit(CHILD_EXIT_NOBLOCKING); - if (gevent == (XEvent *) NULL) { + if (gevent == NULL) { int retval; unsigned char buf[512]; diff --git a/xts5/src/lib/cursor.c b/xts5/src/lib/cursor.c index e55390b1..1ab3526c 100644 --- a/xts5/src/lib/cursor.c +++ b/xts5/src/lib/cursor.c @@ -144,7 +144,7 @@ Window window; (unsigned)window); return False; } - withdefault = crechild(display, root, (struct area *)NULL); + withdefault = crechild(display, root, NULL); /* that window should have default Cursor, whatever that is */ /* diff --git a/xts5/src/lib/winh.c b/xts5/src/lib/winh.c index a58f3c3e..ed4ad8c7 100644 --- a/xts5/src/lib/winh.c +++ b/xts5/src/lib/winh.c @@ -128,7 +128,7 @@ purpose. It is provided "as is" without express or implied warranty. #define WEED_MARKED (1<<0) /* matches with an expected/delivered event */ #define WEED_IGNORE (1<<1) /* ignore this event */ -#define FIRSTBORN(winh) ((winh)->prevsibling == (Winh *) NULL) +#define FIRSTBORN(winh) ((winh)->prevsibling == NULL) #define ADD_TO_EXPECTED_GLOBAL(e) \ if ((winh_qexp = addto(winh_qexp, (e))) == (Winhe *) NULL)\ @@ -239,10 +239,10 @@ static int sequence = 0; */ static int expected_events = 0; -Winhe *winh_qexp = (Winhe *) NULL; /* list of expected events */ -Winhe *winh_qdel = (Winhe *) NULL; /* list of delivered events */ +Winhe *winh_qexp = NULL; /* list of expected events */ +Winhe *winh_qdel = NULL; /* list of delivered events */ -Winh *guardian = (Winh *) NULL; +Winh *guardian = NULL; /* * static globals used to communicate between winh_walk() procedures and @@ -1055,16 +1055,16 @@ free_eventlist() winh_event_stats[i].count = 0; } /* Free global queue members */ - if (winh_qexp != (Winhe *) NULL) { + if (winh_qexp != NULL) { winhe_free(winh_qexp); - winh_qexp = (Winhe *) NULL; + winh_qexp = NULL; } - if (winh_qdel != (Winhe *) NULL) { + if (winh_qdel != NULL) { winhe_free(winh_qdel); - winh_qdel = (Winhe *) NULL; + winh_qdel = NULL; } - if (guardian != (Winh *) NULL && - (i = winh_walk((Winh *) NULL, 0, _free_eventlist))) + if (guardian != NULL && + (i = winh_walk(NULL, 0, _free_eventlist))) return(i); sequence = 0; expected_events = 0; diff --git a/xts5/src/libXR5/blowup.c b/xts5/src/libXR5/blowup.c index 967f9af1..aceb263c 100644 --- a/xts5/src/libXR5/blowup.c +++ b/xts5/src/libXR5/blowup.c @@ -303,7 +303,7 @@ int compare_color; /* initialize rectangle pixmap overlay gc */ - rect_gc = XCreateGC(vdisplay,window,(unsigned long)0,(XGCValues *)NULL); + rect_gc = XCreateGC(vdisplay,window,(unsigned long)0,NULL); XSetForeground(vdisplay,rect_gc,1L); /* this works well with xor function */ XSetBackground(vdisplay,rect_gc,0L); XSetFunction(vdisplay,rect_gc,GXxor); diff --git a/xts5/src/libXtTest/avs_def.c b/xts5/src/libXtTest/avs_def.c index 3c677997..c734fd67 100644 --- a/xts5/src/libXtTest/avs_def.c +++ b/xts5/src/libXtTest/avs_def.c @@ -105,10 +105,10 @@ char *string; root_widget = (Widget)XtInitialize ( NULL, "Tmainloop1", - (XrmOptionDescRec *)NULL, /* cmd options */ + NULL, /* cmd options */ (Cardinal)0, /* num cmd */ &argcount, - (String *)NULL + NULL ); if (root_widget == NULL) { diff --git a/xts5/src/libXtTest/avs_init.c b/xts5/src/libXtTest/avs_init.c index ee347387..459f141f 100644 --- a/xts5/src/libXtTest/avs_init.c +++ b/xts5/src/libXtTest/avs_init.c @@ -144,7 +144,7 @@ int argcount; (String)cfgdisplay, /* display name */ "VSW5 X Toolkit Tests", /*application name*/ app_class, /* application class */ - (XrmOptionDescRec *)NULL,/* command line options */ + NULL,/* command line options */ (Cardinal)0, /* num command line options */ &argcount, argvector /* command line args */ @@ -187,7 +187,7 @@ int argcount; XtNy, y_origin, XtNwidth, width, XtNheight, height, - (char *)NULL + NULL ); /* return toplevel shell widget */ diff --git a/xts5/src/libXtTest/avs_widget.c b/xts5/src/libXtTest/avs_widget.c index 961efd2d..e80b041a 100644 --- a/xts5/src/libXtTest/avs_widget.c +++ b/xts5/src/libXtTest/avs_widget.c @@ -87,7 +87,7 @@ Widget w; "mainw", /* arbitrary widget name */ viewportWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)mainw); @@ -103,7 +103,7 @@ Widget w; "drawaw", /* arbitrary widget name */ formWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)drawaw); @@ -119,7 +119,7 @@ Widget w; "formw", /* arbitrary widget name */ formWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)formw); @@ -135,7 +135,7 @@ Widget w; "scrollw", /* arbitrary widget name */ viewportWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)scrollw); @@ -152,7 +152,7 @@ Widget w; "rowcolw", /* arbitrary widget name */ formWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)rowcolw); @@ -167,7 +167,7 @@ Widget w; "framew", /* arbitrary widget name */ boxWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)framew); @@ -182,7 +182,7 @@ Widget w; "panedw", /* arbitrary widget name */ panedWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)panedw); @@ -197,7 +197,7 @@ Widget w; "panedw", /* arbitrary widget name */ boxWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)boxw); @@ -213,7 +213,7 @@ Widget w; string, /* arbitrary widget name */ labelWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)labelw); @@ -230,7 +230,7 @@ Widget w; string, /* arbitrary widget name */ commandWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)pushb); @@ -247,7 +247,7 @@ Widget w; w, /* parent widget */ XtNheight,100, XtNwidth, 100, - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)menuw); @@ -262,7 +262,7 @@ Widget w; "dialogsw", /* arbitrary widget name */ simpleMenuWidgetClass, /* widget class */ w, /* parent widget */ - (char *)NULL /* terminate list */ + NULL /* terminate list */ ); return((Widget)dialogsw); diff --git a/xts5/src/libXtTest/event.c b/xts5/src/libXtTest/event.c index 07b5d2dd..4f5877c7 100644 --- a/xts5/src/libXtTest/event.c +++ b/xts5/src/libXtTest/event.c @@ -176,7 +176,7 @@ int t; sigemptyset(&(nact.sa_mask)); nact.sa_handler = lsah; nact.sa_flags = 0; - s2 = sigaction(SIGALRM,&nact,(struct sigaction *)NULL); + s2 = sigaction(SIGALRM,&nact,NULL); if (s2 == -1) { uwerrno("sigaction"); vsw_debug_exit("libXtTest/event.c:avs_wait_event()",0); @@ -200,7 +200,7 @@ int t; sigemptyset(&(nact.sa_mask)); nact.sa_handler = SIG_DFL; nact.sa_flags = 0; - s2 = sigaction(SIGALRM,&nact,(struct sigaction *)NULL); + s2 = sigaction(SIGALRM,&nact,NULL); if (s2 == -1) { uwerrno("sigaction"); vsw_debug_exit("libXtTest/event.c:avs_wait_event()",0); diff --git a/xts5/src/libXtTest/signals.c b/xts5/src/libXtTest/signals.c index aaa6499e..a357161c 100644 --- a/xts5/src/libXtTest/signals.c +++ b/xts5/src/libXtTest/signals.c @@ -112,7 +112,7 @@ void (*handler)(int); } nact.sa_handler = handler; nact.sa_flags = 0; - s2 = sigaction(sig,&nact,(struct sigaction *)NULL); + s2 = sigaction(sig,&nact,NULL); if (s2 == -1) { uwerrno("sigaction"); vsw_debug_exit("libXtTest/signals.c:avs_signal()",0); diff --git a/xts5/src/libXtaw/Scrollbar.c b/xts5/src/libXtaw/Scrollbar.c index 6abee2f3..c5ed7f1c 100644 --- a/xts5/src/libXtaw/Scrollbar.c +++ b/xts5/src/libXtaw/Scrollbar.c @@ -504,7 +504,7 @@ static void Resize( gw ) /* ForgetGravity has taken care of background, but thumb may * have to move as a result of the new size. */ SetDimensions( (ScrollbarWidget)gw ); - Redisplay( gw, (XEvent*)NULL, (Region)NULL ); + Redisplay( gw, NULL, (Region)NULL ); } diff --git a/xts5/src/libXtaw/Tree.c b/xts5/src/libXtaw/Tree.c index 6a8cfbd0..e52f4e06 100644 --- a/xts5/src/libXtaw/Tree.c +++ b/xts5/src/libXtaw/Tree.c @@ -974,7 +974,7 @@ static void set_tree_size (tw, insetvalues, width, height) */ if (result == XtGeometryAlmost) XtMakeResizeRequest ((Widget) tw, replyWidth, replyHeight, - (Dimension *) NULL, (Dimension *) NULL); + NULL, NULL); } return; } diff --git a/xts5/src/libXtmu/StrToCurs.c b/xts5/src/libXtmu/StrToCurs.c index f16bfea0..e2b965e9 100644 --- a/xts5/src/libXtmu/StrToCurs.c +++ b/xts5/src/libXtmu/StrToCurs.c @@ -163,7 +163,7 @@ void XmuCvtStringToCursor(args, num_args, fromVal, toVal) if (*num_args != 1) XtErrorMsg("wrongParameters","cvtStringToCursor","XtToolkitError", "String to cursor conversion needs screen argument", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); screen = *((Screen **) args[0].addr); @@ -301,7 +301,7 @@ XmuCvtStringToColorCursor(dpy, args, num_args, fromVal, toVal, converter_data) XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "wrongParameters","cvtStringToColorCursor","XmuError", "String to color cursor conversion needs four arguments", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); return False; } diff --git a/xts5/src/libXtmu/StrToWidg.c b/xts5/src/libXtmu/StrToWidg.c index f04401bd..1dc917f6 100644 --- a/xts5/src/libXtmu/StrToWidg.c +++ b/xts5/src/libXtmu/StrToWidg.c @@ -201,7 +201,7 @@ Boolean XmuNewCvtStringToWidget(dpy, args, num_args, fromVal, toVal, XtAppWarningMsg(XtDisplayToApplicationContext(dpy), "wrongParameters","cvtStringToWidget","xtToolkitError", "String To Widget conversion needs parent argument", - (String *)NULL, (Cardinal *)NULL); + NULL, NULL); parent = *(Widget*)args[0].addr; /* try to match names of normal children */ diff --git a/xts5/src/libproto/ClientMng.c b/xts5/src/libproto/ClientMng.c index 86f69d63..a5a40c9a 100644 --- a/xts5/src/libproto/ClientMng.c +++ b/xts5/src/libproto/ClientMng.c @@ -377,7 +377,7 @@ int cl; /* client number */ * name in displaybuf. */ - dpy -> xlib_dpy = (Display *)NULL; + dpy -> xlib_dpy = NULL; if ((dpy -> fd = XstConnectDisplay (display_name, displaybuf, &screen_num, &auth_proto, &auth_length, &auth_string, &auth_strlen, @@ -389,7 +389,7 @@ int cl; /* client number */ free ((char *) dpy); return (NULL); /* errno set by XConnectDisplay */ } - using_xo = (dpy->xlib_dpy != (Display *)NULL); + using_xo = (dpy->xlib_dpy != NULL); /* @@ -528,7 +528,7 @@ int cl; /* client number */ return NULL; } if ((u.setup = (xConnSetup *) (setup = (char *) Xstmalloc ((unsigned) setuplength))) - == (xConnSetup *)NULL) { + == NULL) { errno = ENOMEM; Log_Msg ("Not enough memory to allocate rest of connection data (%d bytes)\n", setuplength); if (using_xo) @@ -551,11 +551,11 @@ int cl; /* client number */ dpy -> resource_mask = u.setup -> ridMask; dpy -> min_keycode = u.setup -> minKeyCode; dpy -> max_keycode = u.setup -> maxKeyCode; - dpy -> keysyms = (KeySym *) NULL; + dpy -> keysyms = NULL; dpy -> modifiermap = XstNewModifiermap (0); dpy -> keysyms_per_keycode = 0; dpy -> current = None; - dpy -> xdefaults = (char *) NULL; + dpy -> xdefaults = NULL; dpy -> scratch_length = 0L; dpy -> scratch_buffer = NULL; dpy -> motion_buffer = u.setup -> motionBufferSize; @@ -567,10 +567,10 @@ int cl; /* client number */ dpy -> bitmap_bit_order = u.setup -> bitmapBitOrder; dpy -> max_request_size = u.setup -> maxRequestSize; #ifdef notrequired - dpy -> ext_procs = (struct _XExten *) NULL; + dpy -> ext_procs = NULL; dpy -> ext_number = 0; #endif - dpy -> ext_data = (XExtData *) NULL; + dpy -> ext_data = NULL; dpy -> event_vec[X_Error] = NULL; dpy -> event_vec[X_Reply] = NULL; dpy -> wire_vec[X_Error] = NULL; @@ -719,7 +719,7 @@ int cl; /* client number */ dpy -> last_request_read = 0; dpy -> default_screen = screen_num; /* Value returned by ConnectDisplay */ - dpy -> last_req = (char *) NULL; + dpy -> last_req = NULL; /* Salt away the host:display string for later use */ if ((dpy -> display_name = (char *) Xstmalloc ( @@ -863,7 +863,7 @@ int client; XstDisplay *dpy = Get_Display(client); int tmpfd = -1; - if (dpy == (XstDisplay *)NULL) + if (dpy == NULL) return; tmpfd = dpy->fd; diff --git a/xts5/src/libproto/ConnDis.c b/xts5/src/libproto/ConnDis.c index c3a57cf3..1820c002 100644 --- a/xts5/src/libproto/ConnDis.c +++ b/xts5/src/libproto/ConnDis.c @@ -751,7 +751,7 @@ auth_ezencode( #else a = (AUTH *)authdes_create(servername, window, NULL, NULL); #endif - if (a == (AUTH *)NULL) { + if (a == NULL) { perror("auth_create"); return 0; } diff --git a/xts5/src/libproto/Expect.c b/xts5/src/libproto/Expect.c index 6c738fad..cd934113 100644 --- a/xts5/src/libproto/Expect.c +++ b/xts5/src/libproto/Expect.c @@ -527,7 +527,7 @@ int type; /* request type */ return ((xReply *) & dummy_reply); } if (class == EXPECT_01EVENT) - return ((xReply *) NULL); + return (NULL); got = enames (EXPECT_NOTHING, 0); (*Log_Rtn) ("Expect: wanted %s, got %s\n", wanted, got); return (NULL); @@ -552,7 +552,7 @@ int type; /* request type */ default: break; } - return ((xReply *) NULL); + return (NULL); } diff --git a/xts5/src/libproto/XlibNoXtst.c b/xts5/src/libproto/XlibNoXtst.c index d7595618..f47255e7 100644 --- a/xts5/src/libproto/XlibNoXtst.c +++ b/xts5/src/libproto/XlibNoXtst.c @@ -233,7 +233,7 @@ int XstConnectDisplay (display_name, expanded_name, screen_num, *auth_length = 0; *auth_string = ""; *auth_strlen = 0; - *xlib_dpy = (Display *)NULL; + *xlib_dpy = NULL; /* * Find the ':' seperator and extract the hostname and the * display number. @@ -241,7 +241,7 @@ int XstConnectDisplay (display_name, expanded_name, screen_num, * as "host::number" */ strncpy(displaybuf, display_name, sizeof(displaybuf)); - if ((display_ptr = SearchString(displaybuf,':')) == (char *)NULL) + if ((display_ptr = SearchString(displaybuf,':')) == NULL) return (-1); #ifdef DNETCONN if (*(display_ptr + 1) == ':') { diff --git a/xts5/src/libproto/XlibOpaque.c b/xts5/src/libproto/XlibOpaque.c index b20b9b11..70a6abc9 100644 --- a/xts5/src/libproto/XlibOpaque.c +++ b/xts5/src/libproto/XlibOpaque.c @@ -195,7 +195,7 @@ int XstConnectDisplay (display_name, expanded_name, screen_num, *auth_string = ""; *auth_strlen = 0; *xlib_dpy = XOpenDisplay(display_name); - if (*xlib_dpy == (Display *)NULL) + if (*xlib_dpy == NULL) return -1; (void)strcpy(expanded_name, display_name); *screen_num = DefaultScreen(*xlib_dpy); diff --git a/xts5/src/libproto/XlibXtst.c b/xts5/src/libproto/XlibXtst.c index 970c0ab4..3725a18c 100644 --- a/xts5/src/libproto/XlibXtst.c +++ b/xts5/src/libproto/XlibXtst.c @@ -256,7 +256,7 @@ int XstConnectDisplay (display_name, expanded_name, screen_num, { int idisplay; - *xlib_dpy = (Display *)NULL; + *xlib_dpy = NULL; XSetIOErrorHandler(complain); return _XConnectDisplay(display_name, expanded_name, &idisplay, screen_num, auth_proto, auth_length, auth_string, auth_strlen); |