Skip to content

Instantly share code, notes, and snippets.

View rjwalsh's full-sized avatar

Robert Walsh rjwalsh

View GitHub Profile
@rjwalsh
rjwalsh / dups.py
Last active August 29, 2015 14:01
#!/usr/bin/python
# List the duplicate entries in the minipro devices.h file
import re
o = open('devices.h', 'r')
prog = re.compile("^\s*\.(\S+)\s*=\s*\"?(.+?)\"?\s*,\s*$")
diff --git a/database.c b/database.c
index aa90d3e..952b4f9 100644
--- a/database.c
+++ b/database.c
@@ -12,4 +12,5 @@ device_t *get_device_by_name(const char *name) {
if(!strcmp(name, device->name))
return(device);
}
+ return NULL;
}