Skip to content

Commit

Permalink
removing some function calls with no effect
Browse files Browse the repository at this point in the history
  • Loading branch information
MX682X committed Aug 14, 2024
1 parent a3e22db commit f114136
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/pickit5.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ static int pickit5_open(PROGRAMMER *pgm, const char *port) {
return -1;
}
unsigned int new_vid = 0, new_pid = 0;
char vid_string[5], pid_string[5];
char *vidp, *pidp;

/*
Expand All @@ -358,12 +357,6 @@ static int pickit5_open(PROGRAMMER *pgm, const char *port) {
if(pidp != NULL) {
if(vidp != pidp) { // User specified an VID
// First: Handle VID input
unsigned int len = pidp - vidp;

if(len > 4)
len = 4;
strncpy(vid_string, vidp, 4);
str_lc(vid_string);
if(sscanf(vidp, "%x", &new_vid) != 1) {
pmsg_error("failed to parse -P VID input %s: unexpected format", vidp);
return -1;
Expand All @@ -373,8 +366,6 @@ static int pickit5_open(PROGRAMMER *pgm, const char *port) {
}

// Now handle PID input
strncpy(pid_string, pidp + 1, 4);
str_lc(pid_string);
if(sscanf(pidp + 1, "%x", &new_pid) != 1) {
pmsg_error("failed to parse -P PID input %s: unexpected format", pidp+1);
return -1;
Expand Down

0 comments on commit f114136

Please sign in to comment.