dtstyle: Coverity 87251
authorPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:54:16 +0000 (18:54 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 17:54:16 +0000 (18:54 +0100)
cde/programs/dtstyle/ColorFile.c

index 564ab16924fb7c4ee8fcd8851f894514bf83b0d0..28bc4287c94f724ca96a52f02f379b4857ee4121 100644 (file)
@@ -526,7 +526,10 @@ WriteOutDesc(
    if (hm_pl_DB )
      XrmPutFileDatabase(hm_pl_DB, desc_file);
    /* make the file read, write */
-   chmod(desc_file,438);
+   if(chmod(desc_file,438) == -1) {
+      fprintf(stderr, "failed to chmod '%s', %s\n", desc_file, strerror(errno));
+   }
+
    XtFree(desc_file);
    XtFree(desc_name);