Re: [PATCH] Add git-imap-send.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, 9 Mar 2006, Junio C Hamano wrote:

> Mike McCormack <mike@xxxxxxxxxxxxxxx> writes:
> 
> > +		if (!memcmp( "imaps:", val, 6 )) {
> > +			if (!memcmp( "imap:", val, 5 ))
> 
> Is val always longer than 5 or 6 bytes here?

That does not matter, since they are strings, and the memcmp should not 
look further if they are shorter (because the comparison to '\0' failed 
already).

However, if !memcmp("imaps:", val, 6), it means that val starts with 
the string "imaps:", right? Then !memcmp("imap:", val, 5) must always 
fail, no?

Ciao,
Dscho

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]