Use unsigned where appropriate.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22896 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		@@ -294,13 +294,18 @@ generate_constant (const Symbol *s)
 | 
				
			|||||||
	break;
 | 
						break;
 | 
				
			||||||
    case objectidentifiervalue: {
 | 
					    case objectidentifiervalue: {
 | 
				
			||||||
	struct objid *o, **list;
 | 
						struct objid *o, **list;
 | 
				
			||||||
	int i, len;
 | 
						unsigned int i, len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	generate_header_of_codefile(s->gen_name);
 | 
						generate_header_of_codefile(s->gen_name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	len = 0;
 | 
						len = 0;
 | 
				
			||||||
	for (o = s->value->u.objectidentifiervalue; o != NULL; o = o->next)
 | 
						for (o = s->value->u.objectidentifiervalue; o != NULL; o = o->next)
 | 
				
			||||||
	    len++;
 | 
						    len++;
 | 
				
			||||||
 | 
						if (len == 0) {
 | 
				
			||||||
 | 
						    printf("s->gen_name: %s",s->gen_name);
 | 
				
			||||||
 | 
						    fflush(stdout);
 | 
				
			||||||
 | 
						    break;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	list = emalloc(sizeof(*list) * len);
 | 
						list = emalloc(sizeof(*list) * len);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	i = 0;
 | 
						i = 0;
 | 
				
			||||||
@@ -308,8 +313,8 @@ generate_constant (const Symbol *s)
 | 
				
			|||||||
	    list[i++] = o;
 | 
						    list[i++] = o;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fprintf (headerfile, "/* OBJECT IDENTIFIER %s ::= { ", s->name);
 | 
						fprintf (headerfile, "/* OBJECT IDENTIFIER %s ::= { ", s->name);
 | 
				
			||||||
	for (i = len - 1 ; i >= 0; i--) {
 | 
						for (i = len ; i > 0; i--) {
 | 
				
			||||||
	    o = list[i];
 | 
						    o = list[i - 1];
 | 
				
			||||||
	    fprintf(headerfile, "%s(%d) ",
 | 
						    fprintf(headerfile, "%s(%d) ",
 | 
				
			||||||
		    o->label ? o->label : "label-less", o->value);
 | 
							    o->label ? o->label : "label-less", o->value);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -320,8 +325,8 @@ generate_constant (const Symbol *s)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	fprintf (codefile, "static unsigned oid_%s_variable_num[%d] =  {",
 | 
						fprintf (codefile, "static unsigned oid_%s_variable_num[%d] =  {",
 | 
				
			||||||
		 s->gen_name, len);
 | 
							 s->gen_name, len);
 | 
				
			||||||
	for (i = len - 1 ; i >= 0; i--) {
 | 
						for (i = len ; i > 0; i--) {
 | 
				
			||||||
	    fprintf(codefile, "%d%s ", list[i]->value, i > 0 ? "," : "");
 | 
						    fprintf(codefile, "%d%s ", list[i - 1]->value, i > 1 ? "," : "");
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	fprintf(codefile, "};\n");
 | 
						fprintf(codefile, "};\n");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user