maximum filename length limits */
input_base = basename(input_file);
tmp = strchr(input_base, '.');
- if (tmp != NULL) {
+ if (tmp) {
*tmp = 0;
}
if (strlen(input_base) > 10) {
"OBJCPLUS_INCLUDE_PATH", /* clang */
NULL
};
- for (p = envvars; *p != NULL; ++p) {
+ for (p = envvars; *p; ++p) {
char *v = getenv(*p);
if (v) {
hash_delimiter(hash, *p);
}
output_is_precompiled_header =
- actual_language && strstr(actual_language, "-header") != NULL;
+ actual_language && strstr(actual_language, "-header");
if (!found_c_opt) {
if (output_is_precompiled_header) {
/*
* Copyright (C) 2002-2006 Andrew Tridgell
- * Copyright (C) 2009-2011 Joel Rosdahl
+ * Copyright (C) 2009-2011, 2013 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
goto out;
}
- if (strstr(p, ".tmp.") != NULL) {
+ if (strstr(p, ".tmp.")) {
/* delete any tmp files older than 1 hour */
if (st->st_mtime + 3600 < time(NULL)) {
x_unlink(fname);
/*
- * Copyright (C) 2011-2012 Joel Rosdahl
+ * Copyright (C) 2011-2013 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
char **value = (char **)result;
free(*value);
*value = subst_env_in_string(str, errmsg);
- return *value != NULL;
+ return *value;
}
static bool
} while ((arg = argv[i++]));
str = ptr = malloc(l + 1);
- if (str == NULL)
+ if (!str)
return NULL;
i = 0;
/*
- * Copyright (C) 2010 Joel Rosdahl
+ * Copyright (C) 2010, 2013 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
bool
language_is_supported(const char *language)
{
- return p_language_for_language(language) != NULL;
+ return p_language_for_language(language);
}
bool
m = md;
- if (in == NULL) {
+ if (!in) {
if (!md->finalized) {
mdfour_tail(md->tail, md->tail_len);
md->finalized = 1;