Standardize `!ptr` i/o `ptr == NULL`, `ptr` i/o `ptr != NULL`
[babeltrace.git] / src / compat / stdio.h
index 906e695dfd9227a438195fec0ab8c293a4033a22..a484ed2994cabd5023c4c4345f0abc829498f7a9 100644 (file)
@@ -37,10 +37,10 @@ char * _bt_getline_bufalloc(char **lineptr, size_t *n, size_t linelen)
        size_t buflen = *n;
        char *buf = *lineptr;
 
-       if (buflen >= linelen && buf != NULL) {
+       if (buflen >= linelen && buf) {
                return buf;
        }
-       if (buf == NULL) {
+       if (!buf) {
                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;
 
-       if (lineptr == NULL || n == NULL) {
+       if (!lineptr || !n) {
                errno = EINVAL;
                return -1;
        }
This page took 0.024328 seconds and 4 git commands to generate.