diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 17:45:37 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-03-12 17:45:37 (GMT) |
commit | e0b895874d5fa39f6d4134b407e930b80ee3ecd7 (patch) | |
tree | 08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /win/tkWinCursor.c | |
parent | 77d7867fd5b20233f0fa9163bd8a44d2ac274b0e (diff) | |
download | tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.zip tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.gz tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.bz2 |
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
Diffstat (limited to 'win/tkWinCursor.c')
-rw-r--r-- | win/tkWinCursor.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c index 2a44196..c53b1b2 100644 --- a/win/tkWinCursor.c +++ b/win/tkWinCursor.c @@ -116,7 +116,7 @@ TkGetCursorByName( goto badCursorSpec; } - cursorPtr = (TkWinCursor *) ckalloc(sizeof(TkWinCursor)); + cursorPtr = ckalloc(sizeof(TkWinCursor)); cursorPtr->info.cursor = (Tk_Cursor) cursorPtr; cursorPtr->winCursor = NULL; cursorPtr->system = 0; @@ -135,8 +135,8 @@ TkGetCursorByName( if (Tcl_IsSafe(interp)) { Tcl_AppendResult(interp, "can't get cursor from a file in", " a safe interpreter", NULL); - ckfree((char *) argv); - ckfree((char *) cursorPtr); + ckfree(argv); + ckfree(cursorPtr); return NULL; } cursorPtr->winCursor = LoadCursorFromFileA(&(argv[0][1])); @@ -165,15 +165,14 @@ TkGetCursorByName( } if (cursorPtr->winCursor == NULL) { - ckfree((char *) cursorPtr); + ckfree(cursorPtr); badCursorSpec: - ckfree((char *) argv); + ckfree(argv); Tcl_AppendResult(interp, "bad cursor spec \"", string, "\"", NULL); return NULL; - } else { - ckfree((char *) argv); - return (TkCursor *) cursorPtr; } + ckfree(argv); + return (TkCursor *) cursorPtr; } /* |