fix dnamlen, they missed the e, so we need to follow.
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 7 Oct 2013 19:03:40 +0000 (21:03 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 7 Oct 2013 19:03:40 +0000 (21:03 +0200)
citadel/config.c
citadel/modules/bio/serv_bio.c
citadel/modules/ctdlproto/serv_rooms.c
citadel/modules/network/serv_netspool.c
citadel/netconfig.c
webcit/icontheme.c
webcit/static.c
webcit/subst.c

index 25b7f66..3d6527f 100644 (file)
@@ -228,14 +228,16 @@ void put_config(void)
        FILE *cfp;
        int blocks_written = 0;
 
-       if ((cfp = fopen(file_citadel_config, "w")) != NULL) {
+       cfp = fopen(file_citadel_config, "w");
+       if (cfp != NULL) {
                blocks_written = fwrite((char *) &config, sizeof(struct config), 1, cfp);
                if (blocks_written == 1) {
-                       fclose(cfp);
                        chown(file_citadel_config, CTDLUID, (-1));
                        chmod(file_citadel_config, 0600);
+                       fclose(cfp);
                        return;
                }
+               fclose(cfp);
        }
        syslog(LOG_EMERG, "%s: %s", file_citadel_config, strerror(errno));
 }
index 041485d..ea88b87 100644 (file)
@@ -113,7 +113,7 @@ void cmd_lbio(char *cmdbuf)
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
 
 #else
                d_namelen = strlen(filedir_entry->d_name);
index 2755da8..deeeb81 100644 (file)
@@ -427,7 +427,7 @@ void cmd_rdir(char *cmdbuf)
                if (strcasecmp(filedir_entry->d_name, "filedir") && filedir_entry->d_name[0] != '.')
                {
 #ifdef _DIRENT_HAVE_D_NAMELEN
-                       d_namelen = filedir_entry->d_namelen;
+                       d_namelen = filedir_entry->d_namlen;
 #else
                        d_namelen = strlen(filedir_entry->d_name);
 #endif
index e5ca89a..62afec6 100644 (file)
@@ -720,7 +720,7 @@ void network_do_spoolin(HashList *working_ignetcfg, HashList *the_netmap, int *n
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
 
 #else
                d_namelen = strlen(filedir_entry->d_name);
@@ -824,7 +824,7 @@ void network_consolidate_spoolout(HashList *working_ignetcfg, HashList *the_netm
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
 
 #else
                d_namelen = strlen(filedir_entry->d_name);
index b673d38..d2a39c6 100644 (file)
@@ -443,7 +443,7 @@ void LoadAllNetConfigs(void)
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
 #else
                d_namelen = strlen(filedir_entry->d_name);
 #endif
index d8c9984..28643ae 100644 (file)
@@ -84,7 +84,7 @@ int LoadThemeDir(const char *DirName)
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMELEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
                d_type = filedir_entry->d_type;
 #else
 
index a1a6251..ba4977d 100644 (file)
@@ -183,7 +183,7 @@ int LoadStaticDir(const char *DirName, HashList *DirList, const char *RelDir)
               (filedir_entry != NULL))
        {
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
+               d_namelen = filedir_entry->d_namlen;
 
 #else
                d_namelen = strlen(filedir_entry->d_name);
index 167a94d..7f90262 100644 (file)
@@ -1526,8 +1526,7 @@ int LoadTemplateDir(const StrBuf *DirName, HashList *big, const StrBuf *BaseKey)
                char *MinorPtr;
 
 #ifdef _DIRENT_HAVE_D_NAMLEN
-               d_namelen = filedir_entry->d_namelen;
-
+               d_namelen = filedir_entry->d_namlen;
 #else
                d_namelen = strlen(filedir_entry->d_name);
 #endif