]> git.ipfire.org Git - location/debian/libloc.git/blobdiff - src/test-stringpool.c
Update upstream source from tag 'upstream/0.9.15'
[location/debian/libloc.git] / src / test-stringpool.c
index 392aa29be85cc572fec52362d5726610b5375811..a94d8f8bd07815e65f6024ee6f5dc4f3d0c4c54b 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, char** argv) {
        // Append a string
        off_t pos = loc_stringpool_add(pool, "ABC");
        if (pos < 0) {
-               fprintf(stderr, "Could not add string: %s\n", strerror(-pos));
+               fprintf(stderr, "Could not add string: %m\n");
                exit(EXIT_FAILURE);
        }
 
@@ -108,7 +108,7 @@ int main(int argc, char** argv) {
                free(string);
 
                if (pos < 0) {
-                       fprintf(stderr, "Could not add string %d: %s\n", i, strerror(-pos));
+                       fprintf(stderr, "Could not add string %d: %m\n", i);
                        exit(EXIT_FAILURE);
                }
        }