Use glib's g_fopen() instead of fopen().
This commit is contained in:
parent
45fdfa307d
commit
868d8cefec
|
@ -312,9 +312,9 @@ static int bin2bitbang(const char *filename,
|
|||
int c, ret, bit, v;
|
||||
uint32_t imm = 0x3f6df2ab;
|
||||
|
||||
f = fopen(filename, "rb");
|
||||
f = g_fopen(filename, "rb");
|
||||
if (!f) {
|
||||
g_warning("fopen(\"%s\", \"rb\")", filename);
|
||||
g_warning("g_fopen(\"%s\", \"rb\")", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ int ezusb_install_firmware(libusb_device_handle *hdl, const char *filename)
|
|||
unsigned char buf[4096];
|
||||
|
||||
g_message("Uploading firmware at %s", filename);
|
||||
if ((fw = fopen(filename, "rb")) == NULL) {
|
||||
if ((fw = g_fopen(filename, "rb")) == NULL) {
|
||||
g_warning("Unable to open firmware file %s for reading: %s",
|
||||
filename, strerror(errno));
|
||||
return 1;
|
||||
|
|
|
@ -168,7 +168,7 @@ int session_save(char *filename)
|
|||
if ((tmpfile = g_mkstemp(metafile)) == -1)
|
||||
return SR_ERR;
|
||||
close(tmpfile);
|
||||
meta = fopen(metafile, "wb");
|
||||
meta = g_fopen(metafile, "wb");
|
||||
fprintf(meta, "[global]\n");
|
||||
fprintf(meta, "sigrok version = %s\n", PACKAGE_VERSION);
|
||||
/* TODO: save protocol decoders used */
|
||||
|
|
Loading…
Reference in New Issue