[libgxps] Do not check for NULL when using g_strdup()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] Do not check for NULL when using g_strdup()
- Date: Sun, 9 Oct 2011 15:47:59 +0000 (UTC)
commit 4ecc04bf42ade12dfd1cbcbcada4562553782463
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Sun Oct 9 17:15:21 2011 +0200
Do not check for NULL when using g_strdup()
g_strdup() is NULL safe
libgxps/gxps-page.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libgxps/gxps-page.c b/libgxps/gxps-page.c
index 16bffca..e2d5456 100644
--- a/libgxps/gxps-page.c
+++ b/libgxps/gxps-page.c
@@ -2679,9 +2679,9 @@ render_start_element (GMarkupParseContext *context,
/* GXPSGlyphs takes ownership of font_uri */
glyphs = gxps_glyphs_new (ctx, font_uri, font_size, x, y);
- glyphs->text = (text) ? g_strdup (text) : NULL;
- glyphs->indices = (indices) ? g_strdup (indices) : NULL;
- glyphs->clip_data = (clip_data) ? g_strdup (clip_data) : NULL;
+ glyphs->text = g_strdup (text);
+ glyphs->indices = g_strdup (indices);
+ glyphs->clip_data = g_strdup (clip_data);
glyphs->bidi_level = bidi_level;
glyphs->is_sideways = is_sideways;
glyphs->italic = italic;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]