Commit 07329b0a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

sn?printf -> strl?cpy

parent 6fce72c7
...@@ -1472,7 +1472,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh ) ...@@ -1472,7 +1472,7 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
memset( psz_title, ' ', mid ); memset( psz_title, ' ', mid );
if( p_sys->b_color ) if( p_sys->b_color )
wcolor_set( p_sys->w, C_TITLE, NULL ); wcolor_set( p_sys->w, C_TITLE, NULL );
snprintf( &psz_title[mid], i_size, "VLC media player "PACKAGE_VERSION ); strlcpy( &psz_title[mid], "VLC media player "PACKAGE_VERSION, i_size );
mvnprintw( y, 0, COLS, "%s", psz_title ); mvnprintw( y, 0, COLS, "%s", psz_title );
attroff( A_REVERSE ); attroff( A_REVERSE );
y += 2; y += 2;
......
...@@ -251,7 +251,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -251,7 +251,7 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
} }
else else
{ {
snprintf( &psz_notify[i_notify], 6, "&" ); strcpy( &psz_notify[i_notify], "&" );
i_notify += 4; i_notify += 4;
} }
i_notify++; i_notify++;
......
...@@ -700,9 +700,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -700,9 +700,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
vlc_mutex_unlock( &p_item->p_stats->lock ); vlc_mutex_unlock( &p_item->p_stats->lock );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'g': case 'g':
...@@ -770,9 +768,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -770,9 +768,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
var_GetInteger( p_input, "bit-rate" )/1000 ); var_GetInteger( p_input, "bit-rate" )/1000 );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'C': case 'C':
...@@ -782,9 +778,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -782,9 +778,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
var_GetInteger( p_input, "chapter" ) ); var_GetInteger( p_input, "chapter" ) );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'D': case 'D':
...@@ -794,9 +788,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -794,9 +788,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
format_duration (buf, sizeof (buf), i_duration); format_duration (buf, sizeof (buf), i_duration);
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "--:--:--" );
snprintf( buf, 10, b_empty_if_na ? "" : "--:--:--" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'F': case 'F':
...@@ -812,9 +804,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -812,9 +804,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
var_GetInteger( p_input, "title" ) ); var_GetInteger( p_input, "title" ) );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'L': case 'L':
...@@ -826,9 +816,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -826,9 +816,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
i_duration - i_time ); i_duration - i_time );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "--:--:--" );
snprintf( buf, 10, b_empty_if_na ? "" : "--:--:--" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'N': case 'N':
...@@ -867,9 +855,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -867,9 +855,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
snprintf( buf, 10, "%.3f", f ); snprintf( buf, 10, "%.3f", f );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'S': case 'S':
...@@ -879,9 +865,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -879,9 +865,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
snprintf( buf, 10, "%d.%d", r/1000, (r/100)%10 ); snprintf( buf, 10, "%d.%d", r/1000, (r/100)%10 );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "-" );
sprintf( buf, b_empty_if_na ? "" : "-" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'T': case 'T':
...@@ -891,9 +875,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string ) ...@@ -891,9 +875,7 @@ char *str_format_meta( vlc_object_t *p_object, const char *string )
format_duration( buf, sizeof(buf), i_time ); format_duration( buf, sizeof(buf), i_time );
} }
else else
{ strcpy( buf, b_empty_if_na ? "" : "--:--:--" );
snprintf( buf, 10, b_empty_if_na ? "" : "--:--:--" );
}
INSERT_STRING_NO_FREE( buf ); INSERT_STRING_NO_FREE( buf );
break; break;
case 'U': case 'U':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment