int changeaddress(struct keyvalue *kv, char *colour, int typeflag,
char *defaultdhcphostname)
{
- char *addressresult;
- char *netmaskresult;
- char *gatewayresult;
- char *dhcphostnameresult;
- char *dhcpforcemturesult;
+ const char *addressresult;
+ const char *netmaskresult;
+ const char *gatewayresult;
+ const char *dhcphostnameresult;
+ const char *dhcpforcemturesult;
struct newtExitStruct es;
newtComponent header;
newtComponent addresslabel;
char* find_nic4mac(char *findmac) {
DIR *dir;
struct dirent *dirzeiger;
- char temp[STRING_SIZE], temp2[STRING_SIZE];
+ char temp[STRING_SIZE] = "";
+ char temp2[STRING_SIZE] = "";
if((dir=opendir(SYSDIR)) == NULL) {
fprintf(flog,"Fehler bei opendir (find_name4nic) ...\n");
return NULL;
}
- sprintf(temp, "");
while((dirzeiger=readdir(dir)) != NULL) {
if(*((*dirzeiger).d_name) != '.' & strcmp(((*dirzeiger).d_name), "lo") != 0) {
sprintf(temp2, "%s", readmac((*dirzeiger).d_name) );
int write_configs_netudev(int card , int colour)
{
- char commandstring[STRING_SIZE];
struct keyvalue *kv = initkeyvalues();
char temp1[STRING_SIZE], temp2[STRING_SIZE], temp3[STRING_SIZE];
char ucolour[STRING_SIZE];
int scan_network_cards(void)
{
FILE *fp;
- char driver[STRING_SIZE], description[STRING_SIZE], macaddr[STRING_SIZE], temp_line[STRING_SIZE];
+ char temp_line[STRING_SIZE];
int count = 0;
const char _driver[]="driver: ";
const char _desc[]="desc: ";
sprintf(message, _("Do you really want to remove the assigned %s interface?"), ucolourcard[card]);
rc = newtWinChoice(_("Warning"), _("OK"), _("Cancel"), message);
- if ( rc = 0 || rc == 1) {
+ if ( rc == 0 || rc == 1) {
clear_card_entry(card);
} else return 1;
if (strcmp(knics[i].macaddr, ""))
kcount++;
- if (neednics = kcount)
+ if (neednics == kcount)
{
strcat(message, "\n");
strcat(message, _("Do you wish to change these settings?"));
return 1;
}
-int set_menu_entry_for(int *nr, int *card)
-{
-
-}
-
int changedrivers(void)
{
struct keyvalue *kv = initkeyvalues();
{ green = 1; red = 1; blue = 1; }
else if (configtype == 4)
{ green = 1; red=1; orange=1; blue = 1; }
- else if (configtype == "")
+ else
{ green = 1; red = 1; }
do