]> jfr.im git - solanum.git/blobdiff - ircd/newconf.c
ircd startup: avoid black magic with file descriptors
[solanum.git] / ircd / newconf.c
index 4f245063bad078c74dfeedadc4dc4cb25e53bf3b..0c89e25206348f6b45a4ab1fbc0f05d1e6fdd8cd 100644 (file)
@@ -225,7 +225,7 @@ conf_set_serverinfo_sid(void *data)
                        return;
                }
 
-               strcpy(ServerInfo.sid, sid);
+               rb_strlcpy(ServerInfo.sid, sid, sizeof(ServerInfo.sid));
        }
 }
 
@@ -300,7 +300,7 @@ conf_set_modules_module(void *data)
 
        m_bn = rb_basename((char *) data);
 
-       if(findmodule_byname(m_bn) == -1)
+       if(findmodule_byname(m_bn) == NULL)
                load_one_module((char *) data, MAPI_ORIGIN_EXTENSION, false);
 
        rb_free(m_bn);