Commit a5658801 authored by Fabio Utzig's avatar Fabio Utzig
Browse files

Merge pull request #18 from TheMassController/master

Fixed return code, updated Makefile
parents 1cfd8137 a084024e
EXE := lm4flash EXE := lm4flash
CFLAGS := -Wall -g -O2 $(shell pkg-config --cflags libusb-1.0) CFLAGS := -Wall $(shell pkg-config --cflags libusb-1.0)
LDFLAGS := $(shell pkg-config --libs libusb-1.0) LDFLAGS := $(shell pkg-config --libs libusb-1.0)
all: CFLAGS += -O2
all: $(EXE) all: $(EXE)
debug: CFLAGS += -g -DDEBUG
debug: $(EXE)
$(EXE): $(EXE).c $(EXE): $(EXE).c
gcc $(CFLAGS) $^ $(LDFLAGS) -o $@ gcc $(CFLAGS) $^ $(LDFLAGS) -o $@
......
...@@ -730,7 +730,7 @@ static int flasher_flash(const char *serial, const char *rom_name) ...@@ -730,7 +730,7 @@ static int flasher_flash(const char *serial, const char *rom_name)
goto done; goto done;
} }
switch (flasher_find_matching_device( switch (retval = flasher_find_matching_device(
ctx, &device, &retval, ICDI_VID, ICDI_PID, serial)) { ctx, &device, &retval, ICDI_VID, ICDI_PID, serial)) {
case FLASHER_SUCCESS: case FLASHER_SUCCESS:
break; break;
......
Supports Markdown
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