Remove "Written by Ben Pfaff <blp@gnu.org>" lines everywhere.
[pspp-builds.git] / src / data / missing-values.c
index d3b872e049f3d9fa9be29eb351d4d5810f290008..fac56d0257bed1cf82b9d70895b96ed6f2103b9a 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
    Copyright (C) 2005 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -303,7 +302,7 @@ can_resize_string (const char *s, int old_width, int new_width)
    contains only spaces in the characters that will be
    trimmed. */
 bool
-mv_is_resizable (struct missing_values *mv, int width) 
+mv_is_resizable (const struct missing_values *mv, int width) 
 {
   assert ((width == 0) == (mv->width == 0));
   if (width > MAX_SHORT_STRING && mv->type != MV_NONE)
@@ -328,7 +327,7 @@ void
 mv_resize (struct missing_values *mv, int width) 
 {
   assert (mv_is_resizable (mv, width));
-  if (width > mv->width) 
+  if (width > mv->width && mv->type != MV_NONE
     {
       int i;
       
@@ -437,5 +436,5 @@ bool
 mv_is_value_system_missing (const struct missing_values *mv,
                             const union value *v)
 {
-  return mv->width == 0 ? v->f == SYSMIS : false;
+  return mv->width == 0 && v->f == SYSMIS;
 }