File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,13 +167,10 @@ MD5_new(self, args)
167167{
168168 md5object * md5p ;
169169 unsigned char * cp = NULL ;
170- int len ;
170+ int len = 0 ;
171171
172- if (!getargs (args , "" )) {
173- err_clear ();
174- if (!getargs (args , "s#" , & cp , & len ))
175- return NULL ;
176- }
172+ if (!newgetargs (args , "|s#" , & cp , & len ))
173+ return NULL ;
177174
178175 if ((md5p = newmd5object ()) == NULL )
179176 return NULL ;
@@ -188,9 +185,9 @@ MD5_new(self, args)
188185/* List of functions exported by this module */
189186
190187static struct methodlist md5_functions [] = {
191- {"new" , (method )MD5_new },
192- {"md5" , (method )MD5_new }, /* Backward compatibility */
193- {NULL , NULL } /* Sentinel */
188+ {"new" , (method )MD5_new , 1 },
189+ {"md5" , (method )MD5_new , 1 }, /* Backward compatibility */
190+ {NULL , NULL } /* Sentinel */
194191};
195192
196193
You can’t perform that action at this time.
0 commit comments