- 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
This commit is contained in:
John Tytgat 2009-02-01 13:37:32 +00:00
parent e8399d8a76
commit 3f0c50e5a0
10 changed files with 17 additions and 18 deletions

View File

@ -156,7 +156,7 @@ STATIC VOID rx_geturl(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__((u
}
else
{
strcpy(result,"\0");
strcpy(result,"");
}
cmd->ac_Result = result;
@ -170,7 +170,7 @@ STATIC VOID rx_gettitle(struct ARexxCmd *cmd, struct RexxMsg *rxm __attribute__(
}
else
{
strcpy(result,"\0");
strcpy(result,"");
}
cmd->ac_Result = result;

View File

@ -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
*/

View File

@ -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);
}

View File

@ -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;

View File

@ -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},

View File

@ -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);

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -327,8 +327,8 @@ int main(int argc, char *argv[])
int state = 0;
char *n;
container_add(ctx, "CHEESE", "This is a test of some cheese.\0", 31);
container_add(ctx, "FOO", "This is a test of some cheese.\0", 31);
container_add(ctx, "CHEESE", "This is a test of some cheese.", sizeof("This is a test of some cheese."));
container_add(ctx, "FOO", "This is a test of some cheese.", sizeof("This is a test of some cheese."));
container_close(ctx);