mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 10:47:18 +00:00 
			
		
		
		
	Janitor patch to change uses of sizeof to ARRAY_LEN
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -258,14 +258,14 @@ static int process_message(struct ast_mansession *s, struct message *m) | ||||
| 		fprintf(stderr, "Missing event in request"); | ||||
| 		return 0; | ||||
| 	} | ||||
| 	for (x=0;x<sizeof(events) / sizeof(events[0]);x++) { | ||||
| 	for (x = 0; x < ARRAY_LEN(events); x++) { | ||||
| 		if (!strcasecmp(event, events[x].event)) { | ||||
| 			if (events[x].func(s, m)) | ||||
| 				return -1; | ||||
| 			break; | ||||
| 		} | ||||
| 	} | ||||
| 	if (x >= sizeof(events) / sizeof(events[0])) | ||||
| 	if (x >= ARRAY_LEN(events)) | ||||
| 		fprintf(stderr, "Ignoring unknown event '%s'", event); | ||||
| #if 0 | ||||
| 	for (x=0;x<m->hdrcount;x++) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user