aboutsummaryrefslogtreecommitdiff
path: root/libf2c/libU77/chmod_.c
diff options
context:
space:
mode:
Diffstat (limited to 'libf2c/libU77/chmod_.c')
-rw-r--r--libf2c/libU77/chmod_.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libf2c/libU77/chmod_.c b/libf2c/libU77/chmod_.c
index 9797b80f3f5..d482d9ed828 100644
--- a/libf2c/libU77/chmod_.c
+++ b/libf2c/libU77/chmod_.c
@@ -29,7 +29,10 @@ Boston, MA 02111-1307, USA. */
#if HAVE_STDLIB_H
# include <stdlib.h>
#else
-# include <stdio.h> /* for NULL */
+# include <stdio.h>
+#endif
+#if STDC_HEADERS
+# include <string.h>
#endif
#include "f2c.h"
@@ -62,7 +65,7 @@ integer G77_chmod_0 (/* const */ char *name, /* const */ char *mode, const ftnle
char chmod_path [] = CHMOD_PATH;
l = strlen (chmod_path);
buff = malloc (Lname+Lmode+l+3+13+1);
- if (buff == NULL) return -1;
+ if (!buff) return -1;
ii[0] = l; a[0] = chmod_path;
ii[1] = 1; a[1] = " ";
ii[2] = Lmode; a[2] = mode;