fix: handle EINTR correctly in get_cpu_mask_from_sysfs
[librseq.git] / src / smp.c
index 6621d39193d0293d2b6d58246cd6558b737de7da..a162c2b471a1273e10d21084a0153c504b0db5c9 100644 (file)
--- a/src/smp.c
+++ b/src/smp.c
@@ -157,7 +157,7 @@ int get_cpu_mask_from_sysfs(char *buf, size_t max_bytes, const char *path)
 
                total_bytes_read += bytes_read;
                assert(total_bytes_read <= max_bytes);
-       } while (max_bytes > total_bytes_read && bytes_read > 0);
+       } while (max_bytes > total_bytes_read && bytes_read != 0);
 
        /*
         * Make sure the mask read is a null terminated string.
This page took 0.026681 seconds and 4 git commands to generate.