comparison src/protocols/yahoo/yahoo.c @ 8216:dcace041cfb8

[gaim-migrate @ 8939] It's an uncommon practice to use strlen("SOMETHING") && strncmp(...) as the value for a length parameter to a strncmp. I'm therefore assuming it's wrong, and fixing it. I'm also going to get some breakfast. I was thinking Lucky Charms, but we're about out of that, so I may go for bacon instead. Or I could go take my shower and get some donuts. It's a tough decision. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Fri, 06 Feb 2004 22:01:05 +0000
parents ad164c1ca79d
children 63c7a16a2c09
comparison
equal deleted inserted replaced
8215:83830cb8467e 8216:dcace041cfb8
1920 char buf[1024], *i = buf; 1920 char buf[1024], *i = buf;
1921 int len; 1921 int len;
1922 GString *s; 1922 GString *s;
1923 1923
1924 len = read(source, buf, sizeof(buf)-1); 1924 len = read(source, buf, sizeof(buf)-1);
1925 if (len <= 0 || (strncmp(buf, "HTTP/1.0 302", strlen("HTTP/1.0 302") && 1925 if (len <= 0 || (strncmp(buf, "HTTP/1.0 302", strlen("HTTP/1.0 302")) &&
1926 strncmp(buf, "HTTP/1.1 302", strlen("HTTP/1.1 302"))))) { 1926 strncmp(buf, "HTTP/1.1 302", strlen("HTTP/1.1 302")))) {
1927 gaim_connection_error(gc, _("Unable to read")); 1927 gaim_connection_error(gc, _("Unable to read"));
1928 return; 1928 return;
1929 } 1929 }
1930 1930
1931 s = g_string_sized_new(len); 1931 s = g_string_sized_new(len);