From: Ben Pfaff Date: Sat, 10 Apr 2010 03:55:25 +0000 (-0700) Subject: variable: Remove unneeded assertions. X-Git-Tag: v0.7.5~78 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19a9c720bb5cae2826e6983bdab72a9c4b74492d;p=pspp-builds.git variable: Remove unneeded assertions. These assertions are already effectively checked anyhow, since the program will already segfault if passed a null pointer. --- diff --git a/src/data/variable.c b/src/data/variable.c index 072b96b8..ba216f48 100644 --- a/src/data/variable.c +++ b/src/data/variable.c @@ -199,8 +199,6 @@ var_is_valid_name (const char *name, bool issue_error) bool plausible; size_t length, i; - assert (name != NULL); - /* Note that strlen returns number of BYTES, not the number of CHARACTERS */ length = strlen (name); @@ -246,8 +244,6 @@ var_is_plausible_name (const char *name, bool issue_error) { size_t length; - assert (name != NULL); - /* Note that strlen returns number of BYTES, not the number of CHARACTERS */ length = strlen (name); @@ -849,7 +845,6 @@ var_get_short_name (const struct variable *var, size_t idx) void var_set_short_name (struct variable *var, size_t idx, const char *short_name) { - assert (var != NULL); assert (short_name == NULL || var_is_plausible_name (short_name, false)); /* Clear old short name numbered IDX, if any. */ @@ -955,7 +950,6 @@ var_detach_aux (struct variable *v) void var_clear_aux (struct variable *v) { - assert (v != NULL); if (v->aux != NULL) { if (v->aux_dtor != NULL)