Fixme

Discover which code snippets in open source project is need to be fixed.

Search Snippets

Upload Tips

We have provided a tool to collect code snippets with FIXME comments and upload them here.

See more

Languages

RT-Thread
so easy (0 ratings)  •  Last indexed on

return system time, please modify this for your platform ! or just return 0 if you don't care about file time.

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
time_t tvalue;

	tvalue = time(NULL);
	
	return (unsigned int)tvalue;
}

#if CONFIG_USE_SYSTEM_MEMORY_ALLOCATOR > 0
static void * sys_malloc(struct uffs_DeviceSt *dev, unsigned int size)
{
	dev = dev;
	uffs_Perror(UFFS_MSG_NORMAL, "system memory alloc %d bytes", size);
	return malloc(size);
}

static URET sys_free(struct uffs_DeviceSt *dev, void *p)
RT-Thread
so easy (0 ratings)  •  Last indexed on

return system time, please modify this for your platform !

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//			or just return 0 if you don't care about file time.
	time_t tvalue;

	tvalue = time(NULL);
	
	return (unsigned int)tvalue;
}

#if CONFIG_USE_SYSTEM_MEMORY_ALLOCATOR > 0
static void * sys_malloc(struct uffs_DeviceSt *dev, unsigned int size)
{
	dev = dev;
	uffs_Perror(UFFS_MSG_NORMAL, "system memory alloc %d bytes", size);
	return malloc(size);
}
RT-Thread
so easy (0 ratings)  •  Last indexed on

this might not be necessary ...

909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
uffs_FlashEraseBlock(dev, newBlock);
		newNode->u.list.block = newBlock;
		if (HAVE_BADBLOCK(dev))
			uffs_BadBlockProcess(dev, newNode);
		else
			uffs_TreeInsertToErasedListTail(dev, newNode);
	}

	if (dev->buf.dirtyGroup[slot].dirty != NULL ||
			dev->buf.dirtyGroup[slot].count != 0) {
		uffs_Perror(UFFS_MSG_NORMAL, "still have dirty buffer ?");
	}

	uffs_BlockInfoPut(dev, newBc);

ext:
RT-Thread
so easy (0 ratings)  •  Last indexed on

We use the same schema for both dir and file.

532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
if (buf->type == UFFS_TYPE_FILE || buf->type == UFFS_TYPE_DIR) {
		if (buf->page_id == 0) {
			fi = (uffs_FileInfo *)(buf->data);
			data_sum = uffs_MakeSum16(fi->name, fi->name_len);
		}
	}

	return data_sum;
}


static URET _CheckDirtyList(uffs_Buf *dirty)
{
	u16 parent;
	u16 serial;
RT-Thread
so easy (0 ratings)  •  Last indexed on

return system time, please modify this for your platform ! or just return 0 if you don't care about file time.

103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#if 0
	time_t tvalue;

	tvalue = time(NULL);
	
	return (unsigned int)tvalue;
#endif
	return 0;
}

#if CONFIG_USE_SYSTEM_MEMORY_ALLOCATOR > 0
static void * sys_malloc(struct uffs_DeviceSt *dev, unsigned int size)
{
	dev = dev;
	uffs_Perror(UFFS_MSG_NORMAL, "system memory alloc %d bytes", size);
	return rt_malloc(size);
RT-Thread
so easy (0 ratings)  •  Last indexed on

mqtt_client_fre() is missing...

102
103
104
105
106
107
108
109
110
111
112
mem_free(client);
}
END_TEST

Suite* mqtt_suite(void)
{
  testfunc tests[] = {
    TESTFUNC(basic_connect),
  };
  return create_suite("MQTT", tests, sizeof(tests)/sizeof(testfunc), mqtt_setup, mqtt_teardown);
}
RT-Thread
so easy (0 ratings)  •  Last indexed on

add idle time support and make it optional

1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
LWIP_UNUSED_ARG(pcb);
  LWIP_UNUSED_ARG(ip);
  return 1;
}
#endif /* PPP_IDLETIMELIMIT */

#if DEMAND_SUPPORT
/********************************************************************
 *
 * get_loop_output - get outgoing packets from the ppp device,
 * and detect when we want to bring the real link up.
 * Return value is 1 if we need to bring up the link, 0 otherwise.
 */
int get_loop_output(void) {
  return 0;
}
RT-Thread
so easy (0 ratings)  •  Last indexed on

should we add an IPv6 static neighbor using his_eui64 ?

1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
return 1;
}

/********************************************************************
 *
 * cif6addr - Remove IPv6 address from interface
 */
int cif6addr(ppp_pcb *pcb, eui64_t our_eui64, eui64_t his_eui64) {
  LWIP_UNUSED_ARG(our_eui64);
  LWIP_UNUSED_ARG(his_eui64);

  netif_ip6_addr_set_state(pcb->netif, 0, IP6_ADDR_INVALID);
  netif_ip6_addr_set(pcb->netif, 0, IP6_ADDR_ANY6);
  return 1;
}
RT-Thread
so easy (0 ratings)  •  Last indexed on

add stats per PPP session

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#if PPP_STATS_SUPPORT
static struct timeval start_time; /* Time when link was started. */
static struct pppd_stats old_link_stats;
struct pppd_stats link_stats;
unsigned link_connect_time;
int link_stats_valid;
#endif /* PPP_STATS_SUPPORT */

/*
 * PPP Data Link Layer "protocol" table.
 * One entry per supported protocol.
 * The last entry must be NULL.
 */
const struct protent* const protocols[] = {
    &lcp_protent,
#if PAP_SUPPORT
RT-Thread
so easy (0 ratings)  •  Last indexed on

require ppp_pcb struct as printpkt() argument

640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
#if 0
	if (!pcb->settings.hide_password)
#endif
	    ppp_print_string(pwd, wlen, printer, arg);
#if 0
	else
	    printer(arg, "<hidden>");
#endif
	break;
    case UPAP_AUTHACK:
    case UPAP_AUTHNAK:
	if (len < 1)
	    break;
	mlen = p[0];
	if (len < mlen + 1)
	    break;