From 3f0c50e5a0eba982aca4ff377b1018018fb16b64 Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Sun, 1 Feb 2009 13:37:32 +0000 Subject: - C strings have always an implicit NUL character at the end, no need to specify an extra one. - riscos/configure/con_theme.c: removed spurious code line. svn path=/trunk/netsurf/; revision=6331 --- riscos/buffer.c | 2 +- riscos/configure/con_theme.c | 7 +++---- riscos/gui/progress_bar.c | 2 +- riscos/gui/status_bar.c | 4 ++-- riscos/plugin.c | 2 +- riscos/theme.c | 6 +++--- riscos/treeview.c | 2 +- riscos/url_complete.c | 2 +- 8 files changed, 13 insertions(+), 14 deletions(-) (limited to 'riscos') diff --git a/riscos/buffer.c b/riscos/buffer.c index ebd099a5e..61ce68c89 100644 --- a/riscos/buffer.c +++ b/riscos/buffer.c @@ -41,7 +41,7 @@ static void ro_gui_buffer_free(void); /** The buffer characteristics */ static osspriteop_area *buffer = NULL; -static char buffer_name[] = "scr_buffer\0\0"; +static char buffer_name[12] = "scr_buffer"; /** The current clip area */ diff --git a/riscos/configure/con_theme.c b/riscos/configure/con_theme.c index 003d67616..0aebd86c0 100644 --- a/riscos/configure/con_theme.c +++ b/riscos/configure/con_theme.c @@ -78,9 +78,9 @@ static wimp_window theme_pane_definition = { static wimp_w theme_pane; static struct theme_descriptor *theme_list = NULL; static struct toolbar_display *toolbars = NULL; -static char theme_radio_validation[] = "Sradiooff,radioon\0"; -static char theme_null_validation[] = "\0"; -static char theme_line_validation[] = "R2\0"; +static char theme_radio_validation[] = "Sradiooff,radioon"; +static char theme_null_validation[] = ""; +static char theme_line_validation[] = "R2"; static bool ro_gui_options_theme_ok(wimp_w w); static bool ro_gui_options_theme_click(wimp_pointer *pointer); @@ -358,7 +358,6 @@ void ro_gui_options_theme_load(void) new_icon.icon.data.indirected_text.validation = theme_line_validation; new_icon.icon.data.indirected_text.size = 1; - strlen(link->descriptor->filename) + 1; xwimp_create_icon(&new_icon, 0); } diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c index 1195d57bb..bcfb99e96 100644 --- a/riscos/gui/progress_bar.c +++ b/riscos/gui/progress_bar.c @@ -56,7 +56,7 @@ struct progress_bar { bool icon_obscured; /**< icon is partially obscured */ }; -static char progress_animation_sprite[] = "progress\0"; +static char progress_animation_sprite[] = "progress"; static osspriteop_header *progress_icon; static unsigned int progress_width; static unsigned int progress_height; diff --git a/riscos/gui/status_bar.c b/riscos/gui/status_bar.c index 1ab458c1f..73d3cd327 100644 --- a/riscos/gui/status_bar.c +++ b/riscos/gui/status_bar.c @@ -51,8 +51,8 @@ struct status_bar { bool visible; /**< status bar is visible? */ }; -static char status_widget_text[] = "\0"; -static char status_widget_validation[] = "R5;Pptr_lr,8,6\0"; +static char status_widget_text[] = ""; +static char status_widget_validation[] = "R5;Pptr_lr,8,6"; wimp_WINDOW(1) status_bar_definition = { {0, 0, 1, 1}, diff --git a/riscos/plugin.c b/riscos/plugin.c index d973e7472..6a9cea38e 100644 --- a/riscos/plugin.c +++ b/riscos/plugin.c @@ -1447,7 +1447,7 @@ bool plugin_write_parameters_file(struct content *c, ppi = 0; } - fwrite("\0", sizeof(char), 4, fp); + fwrite("", sizeof(char), 4, fp); fclose(fp); diff --git a/riscos/theme.c b/riscos/theme.c index a540f3b43..a5c1875cb 100644 --- a/riscos/theme.c +++ b/riscos/theme.c @@ -120,9 +120,9 @@ static wimp_window theme_toolbar_window = { /* Shared icon validation */ -static char theme_url_validation[] = "Pptr_write;KN\0"; -static char theme_null_text_string[] = "\0"; -static char theme_separator_name[] = "separator\0"; +static char theme_url_validation[] = "Pptr_write;KN"; +static char theme_null_text_string[] = ""; +static char theme_separator_name[] = "separator"; static char theme_favicon_sprite[12]; diff --git a/riscos/treeview.c b/riscos/treeview.c index 3989d0887..4a4ad36cf 100644 --- a/riscos/treeview.c +++ b/riscos/treeview.c @@ -75,7 +75,7 @@ static int ro_gui_tree_origin_y; /* element drawing */ static wimp_icon ro_gui_tree_icon; static char ro_gui_tree_icon_validation[24]; -static char ro_gui_tree_icon_null[] = "\0"; +static char ro_gui_tree_icon_null[] = ""; /* dragging information */ static struct tree *ro_gui_tree_current_drag_tree; diff --git a/riscos/url_complete.c b/riscos/url_complete.c index 231a34929..d810f8844 100644 --- a/riscos/url_complete.c +++ b/riscos/url_complete.c @@ -51,7 +51,7 @@ static char *url_complete_original_url = NULL; static bool url_complete_memory_exhausted = false; static const char *url_complete_redraw[MAXIMUM_VISIBLE_LINES]; -static char url_complete_icon_null[] = "\0"; +static char url_complete_icon_null[] = ""; static char url_complete_icon_sprite[12]; static wimp_icon url_complete_icon; static wimp_icon url_complete_sprite; -- cgit v1.2.3