2003-06-09 Marcel Telka <marcel@telka.sk>

* cmd/cmd.c (cmd_get_number): Added variable initialization for %n conversion in sscanf() call.
	* cmd/help.c (cmd_help_run): Removed duplicate 'i' variable declaration.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@473 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 4f80d5f87b
commit 38f0004a90

@ -1,3 +1,8 @@
2003-06-09 Marcel Telka <marcel@telka.sk>
* cmd/cmd.c (cmd_get_number): Added variable initialization for %n conversion in sscanf() call.
* cmd/help.c (cmd_help_run): Removed duplicate 'i' variable declaration.
2003-06-03 Marcel Telka <marcel@telka.sk>
* flash/detectflash.c (detectflash): Renamed detect_cfi to cfi_detect.

@ -65,15 +65,19 @@ cmd_get_number( char *s, unsigned int *i )
{
int n;
int r;
int l;
size_t l;
if (!s || !i)
return -1;
l = strlen( s );
n = -1;
r = sscanf( s, "0x%x%n", i, &n);
if (r == 1 && n == l)
return 0;
n = -1;
r = sscanf( s, "%u%n", i, &n );
if (r == 1 && n == l)
return 0;

@ -36,7 +36,6 @@ cmd_help_run( char *params[] )
/* short description generation */
if (!params[1]) {
int i;
printf( _("Command list:\n\n") );
for (i = 0; cmds[i]; i++)
printf( _("%-13s %s\n"), cmds[i]->name, cmds[i]->desc ? _(cmds[i]->desc) : _("(no description available)") );

Loading…
Cancel
Save