Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
openocd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
card10
openocd
Commits
7b3d54a1
Commit
7b3d54a1
authored
15 years ago
by
Zachary T Welch
Browse files
Options
Downloads
Patches
Plain Diff
Improve avrf.c command argument parsing.
parent
266c423b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/flash/avrf.c
+4
-7
4 additions, 7 deletions
src/flash/avrf.c
with
4 additions
and
7 deletions
src/flash/avrf.c
+
4
−
7
View file @
7b3d54a1
...
...
@@ -456,7 +456,6 @@ static int avrf_mass_erase(struct flash_bank_s *bank)
static
int
avrf_handle_mass_erase_command
(
struct
command_context_s
*
cmd_ctx
,
char
*
cmd
,
char
**
args
,
int
argc
)
{
flash_bank_t
*
bank
;
int
i
;
if
(
argc
<
1
)
...
...
@@ -465,12 +464,10 @@ static int avrf_handle_mass_erase_command(struct command_context_s *cmd_ctx, cha
return
ERROR_OK
;
}
bank
=
get_flash_bank_by_num
(
strtoul
(
args
[
0
],
NULL
,
0
));
if
(
!
bank
)
{
command_print
(
cmd_ctx
,
"flash bank '#%s' is out of bounds"
,
args
[
0
]);
return
ERROR_OK
;
}
flash_bank_t
*
bank
;
int
retval
=
flash_command_get_bank_by_num
(
cmd_ctx
,
args
[
0
],
&
bank
);
if
(
ERROR_OK
!=
retval
)
return
retval
;
if
(
avrf_mass_erase
(
bank
)
==
ERROR_OK
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment