projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git]
/
src
/
compat
/
stdio.h
diff --git
a/src/compat/stdio.h
b/src/compat/stdio.h
index 906e695dfd9227a438195fec0ab8c293a4033a22..a484ed2994cabd5023c4c4345f0abc829498f7a9 100644
(file)
--- a/
src/compat/stdio.h
+++ b/
src/compat/stdio.h
@@
-37,10
+37,10
@@
char * _bt_getline_bufalloc(char **lineptr, size_t *n, size_t linelen)
size_t buflen = *n;
char *buf = *lineptr;
size_t buflen = *n;
char *buf = *lineptr;
- if (buflen >= linelen && buf
!= NULL
) {
+ if (buflen >= linelen && buf) {
return buf;
}
return buf;
}
- if (
buf == NULL
) {
+ if (
!buf
) {
buflen = BT_GETLINE_MINBUFLEN;
} else {
buflen = buflen << 1;
buflen = BT_GETLINE_MINBUFLEN;
} else {
buflen = buflen << 1;
@@
-80,7
+80,7
@@
ssize_t bt_getline(char **lineptr, size_t *n, FILE *stream)
char *buf;
int found_eof = 0;
char *buf;
int found_eof = 0;
- if (
lineptr == NULL || n == NULL
) {
+ if (
!lineptr || !n
) {
errno = EINVAL;
return -1;
}
errno = EINVAL;
return -1;
}
This page took
0.024812 seconds
and
4
git commands to generate.