]> diplodocus.org Git - nmh/blobdiff - test/getcwidth.c
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / test / getcwidth.c
index 2c4755b1c924d5a60f223c54ae62efeec571c888..c1717e17f58334976e3358503f8809fee52a735a 100644 (file)
@@ -114,7 +114,7 @@ getwidth(const char *string)
         * at a time.
         */
 
-       mbtowc(NULL, NULL, 0);
+       if (mbtowc(NULL, NULL, 0)) {}
 
        while (charleft > 0) {
                int clen;