chiark / gitweb /
Add a snprinf wrapper which checks that the buffer was big enough
[elogind.git] / src / journal-remote / journal-upload-journal.c
index 942320cbf63c061d976a89ab8f8ca38f7dd76956..5fd639a76abbc69ce5ce4f699a77d8d12dd91aff 100644 (file)
@@ -104,7 +104,7 @@ static ssize_t write_entry(char *buf, size_t size, Uploader *u) {
 
                         r = snprintf(buf + pos, size - pos,
                                      "_BOOT_ID=%s\n", sd_id128_to_string(boot_id, sid));
-                        if (r + pos> size)
+                        if (r + pos > size)
                                 /* not enough space */
                                 return pos;