[Xcb-commit] tutorial

XCB site xcb at freedesktop.org
Sun Mar 16 10:28:43 PDT 2008


 tutorial/fonts.mdwn |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 3b70eb3a98c91c7cc372d621a97b20a6ead01701
Author: XCB site <xcb at freedesktop.org>
Date:   Sun Mar 16 10:28:43 2008 -0700

    web commit by Peter: code syntax correctin

diff --git a/tutorial/fonts.mdwn b/tutorial/fonts.mdwn
index dd8f7b3..b9d6ee4 100644
--- a/tutorial/fonts.mdwn
+++ b/tutorial/fonts.mdwn
@@ -270,9 +270,7 @@ This example draw a text at 10 pixels (for the base line) of the bottom of a win
 							break;
 						}
 						case XCB_KEY_RELEASE: {
-							xcb_key_release_event_t *kr;
-
-							kr = (xcb_key_release_event_t *)event;
+							xcb_key_release_event_t *kr = (xcb_key_release_event_t *)event;
 
 							switch (kr->detail) {
 								/* ESC */
@@ -280,13 +278,12 @@ This example draw a text at 10 pixels (for the base line) of the bottom of a win
 									free (event);
 									xcb_disconnect (connection);
 									return 0;
-								{
+								}
 							}
+							free (event);
 						}
 					}
-					free (event);
 				}
 			}
-
 			return 0;
 		}


More information about the xcb-commit mailing list