Make buffers larger to stop compiler complaining
[yaffs2.git] / yaffs_guts.c
index 44b1805c2f0e2fba3b26713c702863d997caf985..40a5b46cf6caff782ed5bddd68430d944ba3f81f 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2011 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
  *
  * Created by Charles Manning <charles@aleph1.co.uk>
  *
@@ -4535,13 +4534,11 @@ int yaffs_get_obj_name(struct yaffs_obj *obj, YCHAR *name, int buffer_size)
 
                if (obj->hdr_chunk > 0) {
                        result = yaffs_rd_chunk_tags_nand(obj->my_dev,
-                                                         obj->hdr_chunk,
-                                                         buffer, NULL);
+                               obj->hdr_chunk, buffer, NULL);
+                       if (result == YAFFS_OK)
+                               yaffs_load_name_from_oh(obj->my_dev, name,
+                                       oh->name, buffer_size);
                }
-               if (result == YAFFS_OK)
-                       yaffs_load_name_from_oh(obj->my_dev, name, oh->name,
-                                       buffer_size);
-
                yaffs_release_temp_buffer(obj->my_dev, buffer);
        }