cosmetic: whitespace cleanup
This commit is contained in:
@ -278,12 +278,12 @@ get_remote_mac(struct in_addr ip_addr, unsigned char *mac)
|
|||||||
int matches, hwtype, flags;
|
int matches, hwtype, flags;
|
||||||
memset(mac, 0xFF, 6);
|
memset(mac, 0xFF, 6);
|
||||||
|
|
||||||
arp = fopen("/proc/net/arp", "r");
|
arp = fopen("/proc/net/arp", "r");
|
||||||
if (!arp)
|
if (!arp)
|
||||||
return 1;
|
return 1;
|
||||||
while (!feof(arp))
|
while (!feof(arp))
|
||||||
{
|
{
|
||||||
matches = fscanf(arp, "%15s 0x%8X 0x%8X %2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
|
matches = fscanf(arp, "%15s 0x%8X 0x%8X %2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx",
|
||||||
remote_ip, &hwtype, &flags,
|
remote_ip, &hwtype, &flags,
|
||||||
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);
|
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);
|
||||||
if (matches != 9)
|
if (matches != 9)
|
||||||
|
12
minidlna.c
12
minidlna.c
@ -522,7 +522,7 @@ init(int argc, char **argv)
|
|||||||
if (ifaces >= MAX_LAN_ADDR)
|
if (ifaces >= MAX_LAN_ADDR)
|
||||||
{
|
{
|
||||||
DPRINTF(E_ERROR, L_GENERAL, "Too many interfaces (max: %d), ignoring %s\n",
|
DPRINTF(E_ERROR, L_GENERAL, "Too many interfaces (max: %d), ignoring %s\n",
|
||||||
MAX_LAN_ADDR, word);
|
MAX_LAN_ADDR, word);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
runtime_vars.ifaces[ifaces++] = word;
|
runtime_vars.ifaces[ifaces++] = word;
|
||||||
@ -782,7 +782,7 @@ init(int argc, char **argv)
|
|||||||
if (ifaces >= MAX_LAN_ADDR)
|
if (ifaces >= MAX_LAN_ADDR)
|
||||||
{
|
{
|
||||||
DPRINTF(E_ERROR, L_GENERAL, "Too many interfaces (max: %d), ignoring %s\n",
|
DPRINTF(E_ERROR, L_GENERAL, "Too many interfaces (max: %d), ignoring %s\n",
|
||||||
MAX_LAN_ADDR, argv[i]);
|
MAX_LAN_ADDR, argv[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
runtime_vars.ifaces[ifaces++] = argv[i];
|
runtime_vars.ifaces[ifaces++] = argv[i];
|
||||||
@ -836,7 +836,7 @@ init(int argc, char **argv)
|
|||||||
if (runtime_vars.port <= 0)
|
if (runtime_vars.port <= 0)
|
||||||
{
|
{
|
||||||
printf("Usage:\n\t"
|
printf("Usage:\n\t"
|
||||||
"%s [-d] [-v] [-f config_file] [-p port]\n"
|
"%s [-d] [-v] [-f config_file] [-p port]\n"
|
||||||
"\t\t[-i network_interface] [-u uid_to_run_as]\n"
|
"\t\t[-i network_interface] [-u uid_to_run_as]\n"
|
||||||
"\t\t[-t notify_interval] [-P pid_filename]\n"
|
"\t\t[-t notify_interval] [-P pid_filename]\n"
|
||||||
"\t\t[-s serial] [-m model_number]\n"
|
"\t\t[-s serial] [-m model_number]\n"
|
||||||
@ -845,7 +845,7 @@ init(int argc, char **argv)
|
|||||||
#else
|
#else
|
||||||
"\t\t[-w url] [-R] [-L] [-V] [-h]\n"
|
"\t\t[-w url] [-R] [-L] [-V] [-h]\n"
|
||||||
#endif
|
#endif
|
||||||
"\nNotes:\n\tNotify interval is in seconds. Default is 895 seconds.\n"
|
"\nNotes:\n\tNotify interval is in seconds. Default is 895 seconds.\n"
|
||||||
"\tDefault pid file is %s.\n"
|
"\tDefault pid file is %s.\n"
|
||||||
"\tWith -d minidlna will run in debug mode (not daemonize).\n"
|
"\tWith -d minidlna will run in debug mode (not daemonize).\n"
|
||||||
"\t-w sets the presentation url. Default is http address on port 80\n"
|
"\t-w sets the presentation url. Default is http address on port 80\n"
|
||||||
@ -857,7 +857,7 @@ init(int argc, char **argv)
|
|||||||
"\t-S changes behaviour for systemd\n"
|
"\t-S changes behaviour for systemd\n"
|
||||||
#endif
|
#endif
|
||||||
"\t-V print the version number\n",
|
"\t-V print the version number\n",
|
||||||
argv[0], pidfilename);
|
argv[0], pidfilename);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1083,7 +1083,7 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
if (timeofday.tv_sec >= (lastbeacontime.tv_sec + beacon_interval))
|
if (timeofday.tv_sec >= (lastbeacontime.tv_sec + beacon_interval))
|
||||||
{
|
{
|
||||||
sendBeaconMessage(sbeacon, &tivo_bcast, sizeof(struct sockaddr_in), 1);
|
sendBeaconMessage(sbeacon, &tivo_bcast, sizeof(struct sockaddr_in), 1);
|
||||||
memcpy(&lastbeacontime, &timeofday, sizeof(struct timeval));
|
memcpy(&lastbeacontime, &timeofday, sizeof(struct timeval));
|
||||||
if (timeout.tv_sec > beacon_interval)
|
if (timeout.tv_sec > beacon_interval)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user