]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - libfrog/projects.c
libfrog: fix workqueue_add error out
[thirdparty/xfsprogs-dev.git] / libfrog / projects.c
index c9e863dd397d46fd1c7613138cb0e5bfa1529f6c..dbde97021c63eb02fd9112297349c7116a1c18b1 100644 (file)
@@ -1,25 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright (c) 2005 Silicon Graphics, Inc.
  * All Rights Reserved.
- *
- * 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 Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "project.h"
+#include "projects.h"
 
 #define PROJID         "/etc/projid"
 #define PROJECT_PATHS  "/etc/projects"
@@ -27,12 +15,8 @@ char *projid_file;
 char *projects_file;
 
 static FILE *projects;
-static fs_project_t p;
-static char projects_buffer[512];
 
 static FILE *project_paths;
-static fs_project_path_t pp;
-static char project_paths_buffer[1024];
 
 void
 setprfiles(void)
@@ -76,8 +60,10 @@ endprpathent(void)
 fs_project_t *
 getprent(void)
 {
-       char    *idstart, *idend;
-       size_t  size = sizeof(projects_buffer) - 1;
+       static          fs_project_t p;
+       static char     projects_buffer[512];
+       char            *idstart, *idend;
+       size_t          size = sizeof(projects_buffer) - 1;
 
        if (!projects)
                return NULL;
@@ -137,6 +123,8 @@ getprprid(
 fs_project_path_t *
 getprpathent(void)
 {
+       static          fs_project_path_t pp;
+       static char     project_paths_buffer[1024];
        char            *nmstart, *nmend;
        size_t          size = sizeof(project_paths_buffer) - 1;