projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup: Replace all perror() uses by the PERROR macro
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
filter
/
memstream.h
diff --git
a/src/lib/lttng-ctl/filter/memstream.h
b/src/lib/lttng-ctl/filter/memstream.h
index 2cbb03559b154c322e0bb7f8f3c1518c72fa0f75..7b7797cfaa1ad394ba5aaa4b8d4770fe3c119c27 100644
(file)
--- a/
src/lib/lttng-ctl/filter/memstream.h
+++ b/
src/lib/lttng-ctl/filter/memstream.h
@@
-73,25
+73,25
@@
FILE *lttng_fmemopen(void *buf, size_t size, const char *mode)
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
goto error_close;
}
/* We keep the handle open, but can unlink the file on the VFS. */
ret = unlink(tmpname);
if (ret < 0) {
goto error_close;
}
/* We keep the handle open, but can unlink the file on the VFS. */
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return fp;
error_close:
ret = fclose(fp);
if (ret < 0) {
}
return fp;
error_close:
ret = fclose(fp);
if (ret < 0) {
-
perror
("close");
+
PERROR
("close");
}
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
}
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return NULL;
}
}
return NULL;
}
@@
-148,14
+148,14
@@
FILE *lttng_open_memstream(char **ptr, size_t *sizeloc)
*/
ret = unlink(tmpname);
if (ret < 0) {
*/
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return fp;
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
}
return fp;
error_unlink:
ret = unlink(tmpname);
if (ret < 0) {
-
perror
("unlink");
+
PERROR
("unlink");
}
return NULL;
}
}
return NULL;
}
@@
-170,17
+170,17
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
ret = fflush(fp);
if (ret < 0) {
ret = fflush(fp);
if (ret < 0) {
-
perror
("fflush");
+
PERROR
("fflush");
return ret;
}
ret = fseek(fp, 0L, SEEK_END);
if (ret < 0) {
return ret;
}
ret = fseek(fp, 0L, SEEK_END);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
return ret;
}
pos = ftell(fp);
if (ret < 0) {
return ret;
}
pos = ftell(fp);
if (ret < 0) {
-
perror
("ftell");
+
PERROR
("ftell");
return ret;
}
*size = pos;
return ret;
}
*size = pos;
@@
-191,7
+191,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
}
ret = fseek(fp, 0L, SEEK_SET);
if (ret < 0) {
-
perror
("fseek");
+
PERROR
("fseek");
goto error_free;
}
/* Copy the entire file into the buffer */
goto error_free;
}
/* Copy the entire file into the buffer */
@@
-207,7
+207,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
}
ret = fclose(fp);
if (ret < 0) {
}
ret = fclose(fp);
if (ret < 0) {
-
perror
("fclose");
+
PERROR
("fclose");
return ret;
}
return 0;
return ret;
}
return 0;
@@
-215,7
+215,7
@@
int lttng_close_memstream(char **buf, size_t *size, FILE *fp)
error_close:
ret = fclose(fp);
if (ret < 0) {
error_close:
ret = fclose(fp);
if (ret < 0) {
-
perror
("fclose");
+
PERROR
("fclose");
}
error_free:
free(*buf);
}
error_free:
free(*buf);
This page took
0.025018 seconds
and
4
git commands to generate.